[开源软件] 腾讯云Linux服务器一键安装LAMP/LNMP/LANMP环境 转
| 本帖最后由 我本戏子 于 2015-8-13 22:00 编辑 OneinStack是非常优秀的一键PHP/JAVA安装脚本,提供以下环境: 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) 对于不熟悉Linux的新手来说,非常方便配置网站环境。建议大部分站长使用LAMP/LNMP/LANMP环境即可。 系统:腾讯云Centos6.6 64位 环境配置: 1 yum -y install wget screen #for CentOS/Redhat #apt-get -y install wget screen #for Debian/Ubuntu 2 wget http://mirrors.linuxeye.com/oneinstack-full.tar.gz #包含源码,国内外均可下载 wget http://mirrors.linuxeye.com/oneinstack.tar.gz #不包含源码,建议仅国外主机下载 3 tar xzf oneinstack-full.tar.gz # tar xzf oneinstack.tar.gz cd oneinstack #如果需要修改目录(安装、数据存储、Nginx日志),请修改options.conf文件 4 screen -S oneinstack #如果网路出现中断,可以执行命令`screen -r oneinstack`重新连接安装窗口 5 ./install.sh #请勿sh install.sh或者bash install.sh这样执行 <ignore_js_op> 比如我选择LAMP架构,是这样输入的: Do you want to upgrade operating system? [y/n]: y Your system is already upgraded! Please input SSH port(Default: 22): Do you want to install Web server? [y/n]: y Please select Nginx server: 1. Install Nginx 2. Install Tengine 3. Do not install Please input a number:(Default 1 press Enter) 3 Please select Apache server: 1. Install Apache-2.4 2. Install Apache-2.2 3. Do not install Please input a number:(Default 3 press Enter) 2 Please select tomcat server: 1. Install Tomcat-8 2. Install Tomcat-7 3. Do not install Please input a number:(Default 3 press Enter) 3 Do you want to install Database? [y/n]: y Please select a version of the Database: 1. Install MySQL-5.6 2. Install MySQL-5.5 3. Install MariaDB-10.0 4. Install MariaDB-5.5 5. Install Percona-5.6 6. Install Percona-5.5 Please input a number:(Default 1 press Enter) 1 Please input the root password of database: root3306 Do you want to install PHP? [y/n]: y Please select a version of the PHP: 1. Install php-5.3 2. Install php-5.4 3. Install php-5.5 4. Install php-5.6 5. Install php-7/phpng(beta) Please input a number:(Default 1 press Enter) 3 Do you want to install opcode cache of the PHP? [y/n]: y Please select a opcode cache of the PHP: 1. Install Zend OPcache 2. Install XCache 3. Install APCU Please input a number:(Default 1 press Enter) 1 Do you want to install ionCube? [y/n]: n Do you want to install ImageMagick or GraphicsMagick? [y/n]: n Do you want to install Pure-FTPd? [y/n]: y Do you want to install phpMyAdmin? [y/n]: y Do you want to install redis? [y/n]: n Do you want to install memcached? [y/n]: n Do you want to use jemalloc or tcmalloc optimize Database and Web server? [y/n]: n Do you want to install HHVM? [y/n]: n 然后系统自动编译。大概需要半个小时。 安装完成后会给出APACHE MYSQL PHP PHPMYADMIN等的安装目录等 并询问是否重启主机,输入y,确定重启。 我在上面选择的环境是apache2.2+mysql5.6+php5.5+phpmyadmin(建议)+Zend OPcache 其他组件我用不上,如果你用得上 那么就输入y。 Zend OPcache 通过 opcode 缓存和优化提供更快的 PHP 执行过程。它将预编译的脚本文件存储在共享内存中供以后使用,从而避免了从磁盘读取代码并进行编译的时间消耗。同时,它还应用了一些代码优化模式,使得代码执行更快。 重启后,SSH连接云服务器并 cd oneinstack 添加网站(虚拟主机) ./vhost.sh Please input domain(example: www.linuxeye.com): qq.com domain=qq.com Do you want to add more domain name? [y/n]: y Type domainname,example(linuxeye.com www.example.com): www.qq.com domain list=www.qq.com Please input the directory for the domain:baidu.com : (Default directory: /home/wwwroot/qq.com): Virtual Host Directory=/home/wwwroot/qq.com Create Virtul Host directory...... set permissions of Virtual Host directory...... Allow Apache access_log? [y/n]: y You access log file=/home/wwwlogs/baidu.com_apache.log Syntax OK Restart Apache...... 上面我的选择是绑定qq.com和www.qq.com,允许生成访问日志,网站主目录设置为/home/wwwroot/qq.com 现在我们即可SFTP连接到云服务器进入/home/wwwroot/qq.com目录,上传网站程序。 如何添加数据库? 本地浏览器打开phpmyadmin地址(上面我选择了按照phpmyadmin),用户名root密码是刚才你设置的密码。 新建数据库,新建数据库用户并授权。 现在即可安装网站。 如果我添加虚拟主机的时候输入错了信息,怎么办呢? 删除虚拟主机 ./vhost.sh del 可选择 是否删除该虚拟主机目录下数据。 如何备份? ./backup_**p.sh //设置备份选项 ./backup.sh //立即备份 crontab -e //把备份加入任务计划 0 1 * * * cd ~/oneinstack;./backup.sh > /dev/null 2>&1 & 如何管理服务? Nginx/Tengine: service nginx {start|stop|status|restart|reload|configtest} MySQL/MariaDB/Percona: service mysqld {start|stop|restart|reload|status} PHP: service php-fpm {start|stop|restart|reload|status} HHVM: service supervisord {start|stop|status|restart|reload} 注:hhvm进程交给supervisord管理 Apache: service httpd {start|restart|stop} Tomcat: service tomcat {start|stop|status|restart} Pure-Ftpd: service pureftpd {start|stop|restart|status} Redis: service redis-server {start|stop|status|restart|reload} Memcached: service memcached {start|stop|status|restart|reload} 如何更新apache/nginx的版本? ./upgrade.sh 可以选择更新各种环境组件 What Are You Doing? 1. Upgrade Nginx/Tengine 2. Upgrade MySQL/MariaDB/Percona 3. Upgrade PHP 4. Upgrade Redis 5. Upgrade phpMyAdmin q. Exit 如何卸载oneinstack? ./uninstall.sh |
[开源软件] 腾讯云Linux服务器一键安装LAMP/LNMP/LANMP环境 转的更多相关文章
- 在阿里云Linux服务器上安装MySQL
申请阿里云Linux服务器 昨天在阿里云申请了一个免费试用5天的Linux云服务器. 操作系统:Red Hat Enterprise Linux Server 5.4 64位. CPU:1核 内存:5 ...
- 搭建腾讯云Linux服务器(Centos6)入门教程
搭建腾讯云我们需要准备WinSCP,支持文件上传和下载的客户端,界面操作,很方便快捷,有这个可以不用搭建SVN哦! SecureCRT 7.3,这个是很不错的Linux远程客户端哦,可以去CSDN下载 ...
- 腾讯云linux服务器分区方案
刚刚在腾讯云买了一台服务器,刚买的服务器的数据盘都是需要自己来分区的,下面就记录一下操作. 通过命令fdisk-l查看硬盘信息 可以看到有两块硬盘/dev/vda和/dev/vdb,启动vda是系统盘 ...
- Odoo Linux服务器一键安装脚本使用指南
Odoo安装脚本介绍 为了帮助更多Linux服务器维护人员快速部署Odoo,为此开源智造(OSCG)基于André Schenkels曾经开放的openerp-install-scripts所构建的基 ...
- 压力测试(六)-阿里云Linux服务器压测接口实战
1.SpringBoot 接口打包,并用jar包方式部署 简介:用jar包方式在控制台进行启动 打包 mvn package && java -jar target/gs-spring ...
- 阿里云Linux服务器初探
阿里云Linux服务器初探 阿里云Linux服务器初探 因为钱包的关系,本人买了一个660元2年的1核1GB的小服务器(centos是Linux的发行版),在当初是用2核4GB(内存)的时候使用的是w ...
- 腾讯云Linux VPS新硬盘分区与挂载教程(面板重装不丢失数据)
以腾讯云Centos系统服务器为例,小记的是数据盘不在本地,大小为20G,以下的教程来自小夕博客的一篇相关添加教程的修改,适合腾讯云Linux Centos系统.说明:参数也许不对,我没有截图了,但所 ...
- 腾讯云Linux系统中启动自己安装的tomcat
腾讯云Linux系统中启动自己安装的tomcat 首先通过工具查看一下安装的tomcat的位置 进入命令行之后输入以下指令: 此时,tomcat已经启动了.
- 微软云Linux服务器 Mysql、tomcat远程连接错误解决办法
在微软云linux服务器成功配置好mysql.tomcat,通过外部链接却发现一直错误.Mysql 一直提示错误代码2003, tomcat连接一直提示EOF. 反复检查配置都无问题,最后得知是微软云 ...
随机推荐
- 派大星的烦恼MISC
挺有意思的杂项,python将二进制转图片的时候出现的图片不像二维码,想看题解的时候发现网上的大部分题解都是直接转发,更有意思了. 题目是派大星的烦恼,给了我们一张粉红图片,放进010editor里面 ...
- 刷题记录:[GWCTF 2019]枯燥的抽奖
目录 刷题记录:[GWCTF 2019]枯燥的抽奖 知识点 php伪随机性 刷题记录:[GWCTF 2019]枯燥的抽奖 题目复现链接:https://buuoj.cn/challenges 参考链接 ...
- MySQL事务(一)认识事务
简单来说,事务就是要保证一组数据库操作,要么全部完成,要么全部失败. 为什么要有事务 数据库中的数据是共享资源,因此数据库系统通常要支持多个用户的或不同应用程序的访问,会出现并发存取数据的现象. 数据 ...
- AH/HNOI 2017 礼物
题目链接 描述 两个序列 \(x, y\),可以将一个序列每个值同时加非负整数 \(c\),其中一个序列可以循环移位,要求最小化: \[\sum_{i = 1}^{n}(x_i - y_i) ^ 2 ...
- python命名切片
命名切片 c = slice(2, 5) a = [1, 2, 3, 4, 5, 6, 7] print(a[c])
- MobaXterm无法退格删除
MobaXterm退格删除出现^H,总是要取消输入重新敲语句,很麻烦 解决方法:打开MobaXterm-->settings-->Configuration,把"Backspac ...
- SpringBoot瘦身部署(15.9 MB - 92.3 KB)
1. 简介 SpringBoot项目部署虽然简单,但是经常因为修改了少量代码而需要重新打包上传服务器重新部署,而公网服务器的网速受限,可能整个项目的代码文件仅仅只有1-2MB甚至更少,但是需要上传 ...
- 推荐一款最强Python自动化神器!不用写一行代码!
搞过自动化测试的小伙伴,相信都知道,在Web自动化测试中,有一款自动化测试神器工具: selenium.结合标准的WebDriver API来编写Python自动化脚本,可以实现解放双手,让脚本代替人 ...
- 题解洛谷P1538【迎春舞会之数字舞蹈】
方法:暴力,判断,输出 本题为了更好理解建议各位可以复制样例来研究,甚至可以复制题解来测试思想,相信大家不会抄. 有什么不好的请大佬们在评论里指出,谢谢 #include <bits/stdc+ ...
- [GXYCTF2019]simple CPP
[GXYCTF2019]simple CPP 一.查壳 无壳,64位程序 二.IDA分析 找到主函数后动态调试,看的更清楚 经过调试后我们可以找到len就是储存字符串长度的变量,之后判断长度是不是大于 ...