日期:2014-05-16 浏览次数:20845 次
sudo apt-get install mysql-server mysql-client #中途会让你输入一次root用户密码
sudo apt-get install php5-mysql #安装php5-mysql 是将php和mysql连接起来
sudo start mysql #手动的话这样启动
sudo stop mysql #手动停止
pgrep mysqld
mysql -uroot -p
hadoop@ubuntu:~$ mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 62 Server version: 5.1.41-3ubuntu12.10 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install phpmyadmin
sudo gedit /etc/php5/apache2/php.ini
extension=php5-mcrypt.so
;date.timezone=
date.timezone= PRC
sudo /etc/init.d/apache2 restart
sudo gedit /etc/apache2/apache2.conf
AddType application/x-httpd-php .php .htm .html
AddDefaultCharset UTF-8
<IfModule dir_module> DirectoryIndex index.htm index.html index.php </IfModule>
sudo ln -s /usr/share/phpmyadmin /var/www
sudo gedit /etc/phpmyadmin/apache.conf
Alias /phpmyadmin /usr/share/phpmyadmin <Directory /usr/share/phpmyadmin>
Alias /phpmyadmin /var/www/phpmyadmin <Directory /var/www/phpmyadmin>
sudo /etc/init.d/apache2 restart