yum -y install wget screen curl python #for CentOS/Redhat # apt-get -y install wget screen curl python #for Debian/Ubuntu wget http://aliyun-oss.linuxeye.com/oneinstack-full.tar.gz #阿里云用户下载 wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz #包含源码,国内外均可下载 wget http://mirrors.linuxeye.com/oneinstack.tar.gz #不包含源码,建议仅国外主机下载 tar xzf oneinstack-full.tar.gz cd oneinstack #如果需要修改目录(安装、数据存储、Nginx日志),请修改options.conf文件 screen -S oneinstack #如果网路出现中断,可以执行命令`screen -r oneinstack`重新连接安装窗口 ./install.sh #注:请勿sh install.sh或者bash install.sh这样执行
lnmp(Linux + Nginx+ MySQL+ PHP) lamp(Linux + Apache+ MySQL+ PHP) lnmpa(Linux + Nginx+ MySQL+ PHP+ Apache):Nginx处理静态,Apache(mod_php)处理动态PHP lnmt(Linux + Nginx+ MySQL+ Tomcat):Nginx处理静态,Tomcat(JDK)处理JAVA lnmh(Linux + Nginx+ MySQL+ HHVM)
cd /usr/local/srcwget https://nginx.org/download/nginx-1.9.5.tar.gz
cd /usr/local/srcwget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.3.0.tar.gztar xzf libressl-2.3.0.tar.gz
usr\ local\ src\ libressl-2.3.0 nginx-1.9.5
apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-devgroupadd wwwuseradd www -g www
./configure \ --user=www \ --group=www \ --prefix=/usr/local/nginx \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_gzip_static_module \ --with-ipv6 \ --with-http_v2_module \ --with-openssl=../libressl-2.3.0
--user=www \ #指定nginx运行用户--group=www \ #指定nginx运行用户组--prefix=/usr/local/nginx \ #指定nginx安装路径,不用修改--with-http_stub_status_module \ #开启状态监控模块--with-http_ssl_module \ #开启SSL--with-http_gzip_static_module \ #开启Gzip--with-ipv6 \ #开启ipv6,无v6可去掉--with-http_v2_module \ #开启HTTP/2--with-openssl=../libressl-2.3.0 #指定openssl路径
makemake install
vim /etc/environment#vim操作请自行Google#在PATH变量的最后加入:/usr/local/nginx/sbin#完成后类似于PATH="/.../:/.../:......:/usr/local/nginx/sbin"#保存退出source /etc/environment
cd /usr/local/srcwget https://nginx.org/download/nginx-1.8.0.tar.gzcd /usr/local/src wget https://www.openssl.org/source/openssl-1.0.2d.tar.gz tar zxvf openssl-1.0.2d.tar.gz cd openssl-1.0.2d ./configmakeldconfigapt-get install libpcre3 libpcre3-dev zlib1g zlib1g-devgroupadd wwwuseradd www -g www./configure \ --user=www \ --group=www \ --prefix=/usr/local/nginx \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_gzip_static_module \ --with-ipv6 \ --with-http_v2_module \ --with-openssl=/usr/local/src/openssl-1.0.2dmakemake installvim /etc/environment#vim操作请自行Google#在PATH变量的最后加入:/usr/local/nginx/sbin#完成后类似于PATH="/.../:/.../:......:/usr/local/nginx/sbin"#保存退出source /etc/environmentnginx -v
sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db sudo add-apt-repository 'deb https://mariadb.nethub.com.hk//repo/10.1/ubuntu trusty main' #我的VPS是香港softlayer数据中心 vps.to的VPS,因此,本处添加了HK的apt源,您可以在这里找到更#多的源:https://downloads.mariadb.org/mariadb/repositories
pt-get install mariadb-client mariadb-server
/usr/bin/mysqladmin -u root -p 旧密码 新密码
cd /usr/local/src wget https://downloads.php.net/~ab/php-7.0.0RC5.tar.gz tar xzf php-7.0.0RC5.tar.gz
sudo apt-get install libxml2-dev libpcre3-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libxpm-dev libfreetype6-dev libmysqlclient-dev libt1-dev libgd2-xpm-dev libgmp-dev libsasl2-dev libmhash-dev unixodbc-dev freetds-dev libpspell-dev libsnmp-dev libtidy-dev libxslt1-dev libmcrypt-dev
cd /usr/local/src/php-7.0.0RC5 ./configure --prefix=/usr/local/php \ --with-config-file-path=/usr/local/php/etc \ --with-fpm-user=www --with-fpm-group=www \ --enable-fpm \ --disable-fileinfo \ --enable-mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-iconv-dir=/usr/local \ --with-freetype-dir \ --with-jpeg-dir \ --with-png-dir \ --with-zlib \ --with-libxml-dir=/usr \ --enable-xml \ --disable-rpath \ --enable-bcmath \ --enable-shmop \ --enable-exif \ --enable-sysvsem \ --enable-inline-optimization \ --with-curl \ --enable-mbregex \ --enable-inline-optimization \ --enable-mbstring \ --with-mcrypt \ --with-gd \ --enable-gd-native-ttf \ --with-openssl \ --with-mhash \ --enable-pcntl \ --enable-sockets \ --with-xmlrpc \ --enable-ftp \ --with-gettext \ --enable-zip \ --enable-soap \ --disable-debug make #时间可能较长,我的vps.to VPS花费大约十五分钟 make install
vim /etc/environment #在PATH变量的最后加入: :/usr/local/php/bin #保存退出 source /etc/environment
mkdir /usr/local/nginx/conf/vhost
vim /usr/local/nginx/conf/nginx.conf #在最后的}前一行加入 include vhost/*.conf; #文件头部 user www; work_process 1;#根据CPU核数设定 #保存退出
wget https://raw.github.com/JasonGiedymin/nginx-init-ubuntu/master/nginx -O /etc/init.d/nginx chmod +x /etc/init.d/nginx service nginx start
update-rc.d –f nginx defaults
cd /etc/my.cnf.d vim server.cnf #在[mysqld]段下加入character-set-server=utf8 #在[server]段上方输入[client]default-character-set=utf8 #保存退出service mysql restart
cd /usr/local/src/php-7.0.0RC5cp php.ini-production /usr/local/php/etc/php.ini
vim /usr/local/php/etc/php.ini#定位到display_errors,设置:display_errors = Off#保存退出
cd /usr/local/php/etc cp php-fpm.conf.default php-fpm.conf #如果没有则建立该文件 cd php-fpm.d cp www.conf.default www.conf vim www.conf #修改如下项目: user = www group = www listen = /dev/shm/php-cgi.sock listen.owner = www listen.group = www listen.mode = 0660 #保存退出
cp /usr/local/src/php-7.0.0RC5/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod +x /etc/init.d/php-fpm update-rc.d -f php-fpm defaults
service php-fpm start
wget https://mirrors.linuxeye.com/oneinstack.tar.gz tar xzf oneinstack.tar.gz cd oneinstack ./vhost.sh
wget https://mirrors.linuxeye.com/scripts/auto_fdisk.sh chmod +x ./auto_fdisk.sh ./auto_fdisk.sh
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有