发布时间:2013-12-06 18:18:36作者:知识屋
来源:江湖人称露小缝
1>CentOS
yum install mysql mysql-server
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
mysql_secure_installation
yum install httpd
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
yum install php
/etc/init.d/httpd restart
vi /var/www/html/info.php
在 CentOS 中
Apache 的默认根目录是 /var/www/html
配置文件 /etc/httpd/conf/httpd.conf
其他配置存储在 /etc/httpd/conf.d/
< ?php
phpinfo();
?>
yum search php
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc
/etc/init.d/httpd restart
2>Ubuntu
1.安装 Apache
sudo apt-get install apache2
2.测试 Apache
http://localhost/
3.安装 PHP5
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
4.测试 PHP
sudo gedit /var/www/testphp.php
< ?php phpinfo(); ?>
http://localhost/testphp.php
5.安装 MySQL
sudo apt-get install mysql-server
mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
2012-07-10
CentOS 6.3安装(详细图解教程)
Linux怎么查看网卡驱动?Linux下查看网卡的驱动程序
centos修改主机名命令
Ubuntu或UbuntuKyKin14.04Unity桌面风格与Gnome桌面风格的切换
FEDORA 17中设置TIGERVNC远程访问
StartOS 5.0相关介绍,新型的Linux系统!
解决vSphere Client登录linux版vCenter失败
LINUX最新提权 Exploits Linux Kernel <= 2.6.37
nginx在网站中的7层转发功能