LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5 (貌似原来是5.3)
Codename: Final
1.yum -y update (家的网速慢 更新了很久..很久... )
2.yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql(一句话就OK 了)
3.启动apache 和 mysql service httpd start
service mysqld start
4.设置apache , mysql 自启动
chkconfig httpd on
chkconfig mysqld on
5.配置mysql mysqladmin -u root password '你的密码'
IP访问 211.103.156.121(自己的IP) 访问的是 /var/www/html 这个文件夹
apache 路径
[[email protected] local]# cd /etc/httpd
my.cnf 在/etc/my.cnf
php.ini 在/etc/php.ini
可以用 find 查找my.cnf 和php.ini 文件
find / -name my.cnf
find / -name 文件名称
问题 mysql 修改密码 mysqladmin 不能使用
[[email protected] etc]# find / -name mysqladmin
/usr/local/mysql/bin/mysqladmin
/data/mysql5/bin/mysqladmin
/var/www/mysql-5.5.2-m2/client/mysqladmin
[[email protected] etc]# /var/www/mysql-5.5.2-m2/client/mysqladmin -u root password 'zz'