最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
ubuntu安装php nginx mysql mongodb redis的教程
时间:2022-06-30 19:14:38 编辑:袖梨 来源:一聚教程网
ubuntu apt-get安装软件:
1、安装php:
apt-get install python-software-properties
apt-get install -y ppa-purge
add-apt-repository ppa:ondrej/php5
apt-get update
apt-get install php5-fpm php5-gd php5-cli php5-redis php5-mongo php5-curl php5-mysqlnd php5-bcmath php5-mcrypt php5-dev
2、安装nginx:
add-apt-repository ppa:nginx/stable
apt-get update
apt-get install nginx
3、安装mysql:
add-apt-repository 'deb http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu precise main'
apt-get install mysql-server-5.6
mysql_install_db --user=mysql --basedir=/usr --datadir=/data/mysql/var/
service mysql start
如果在安装过程中,遇到如下错误:
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
解决办法:
mysql -uroot -p
执行:GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'your password';
并修改/etc/mysql/debian.cnf 内容如下:
[client]
host = localhost
user = debian-sys-maint
password =
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password =
socket = /var/run/mysqld/mysqld.sock
basedir = /usr
4、安装redis:
add-apt-repository -y ppa:rwky/redis
apt-get update
apt-get install redis
5、mongodb安装:
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
apt-get update
apt-get install -y mongodb-org
6、解决shell脚本运行报错:
Syntax error: "(" unexpected
解决办法:
dpkg-reconfigure dash
相关文章
- 无限暖暖搭乘大鸟巴士怎么玩 公测第三天每日任务做法介绍 12-27
- 奇迹暖暖绚光护佑搭配攻略 奇迹暖暖绚光护佑过关攻略 12-27
- 绝区零月城柳意像影画怎么样 12-27
- 无限暖暖翩翩愿飞去怎么样 12-27
- 黑神话悟空1.0.12.16581版本更新公告 12-27
- 光遇12.27红石碎片在哪里 12-27