ubuntu 14.04配置lamp粗略
Posted babykin
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu 14.04配置lamp粗略相关的知识,希望对你有一定的参考价值。
1.1 安装Apache2
sudo apt-get install apache2
1.2 安装mysql5
sudo apt-get install mysql-server mysql-client
中途需要设置root密码
1.3 安装php5
sudo apt-get install php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-xcache libssh2-php
1.4 安装phpMyAdmin
sudo apt-get install phpmyadmin
...
Web server to reconfigure automatically:
< -- apache2
Configure database for phpmyadmin with dbconfig-common?
<-- No
...
初始化数据库
sudo mysql -u root -p
Enter Password:
...
mysql> CREATE DATABASE wordpressdb;
mysql> CREATE USER [email protected] IDENTIFIED BY ‘wordpresspassword‘;
mysql> GRANT ALL PRIVILEGES ON wordpressdb.* TO [email protected];
mysql> FLUSH PRIVILEGES;
mysql> exit
重启服务
sudo service apache2 restart
sudo service mysql restart
安装时出现问题apache2 : Depends: perl but it is not going to be installed" in ubuntu 14.04 desktop?
解决:网址:https://www.digitalocean.com/community/questions/how-can-i-get-rid-of-apache2-depends-perl-but-it-is-not-going-to-be-installed-in-ubuntu-14-04-desktop
1.sudo apt-get install -f
或者
2 sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get clean
以上解决后即可安装
安装phpmyadmin时需要cd /var/www//html下然后sudo ln -s /usr/share/phpmyadmin就会在html中见到phpmyadmin了
以上为ubuntu下配置LAMP时可能遇见的问题。亲测有效。本人也是小白,大牛勿喷
以上是关于ubuntu 14.04配置lamp粗略的主要内容,如果未能解决你的问题,请参考以下文章