1.Centos安装Mysql

 --安装
yum install mysql-server 卸载 yum -e mysql-server
--设置为开机启动
chkconfig mysqld on
--启动mysql
service mysqld start
--设置root密码
mysqladmin -u root password 'xxx'
#双机热备
GRANT REPLICATION SLAVE ON *.* TO 'backup'@'192.168.1.33' IDENTIFIED BY 'backup_xxx';
#一般账号
--GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password';
flush privileges;
乱码:
[mysqld]
#add
default-character-set = utf8
character-set-server = utf8
collation-server = utf8_general_ci
init_connect = 'SET collation_connection = utf_general_ci'
init_connect = 'SET NAMES utf8'
[mysqld_safe]

2.安装Redis

wget http://download.redis.io/releases/redis-2.8.7.tar.gz  or  http://download.redis.io/releases/redis-2.6.17.tar.gz
tar -zvxf xxx
configure
make && make install

3.启动memcached

memcached -d -m 100 -u root -p 11211 -P /tmp/memcached.pid

4.防火墙:

 Iptables:
启动iptables
service iptables start
iptables --list //*查看iptables规则集*//
下面是没有定义规划时iptables的样子:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
如何开启/关闭指定端口
例如:
开启81端口:
iptables -I INPUT -i eth0 -p tcp --dport 81 -j ACCEPT
iptables -I OUTPUT -o eth0 -p tcp --sport 81 -j ACCEPT
关闭81端口:
iptables -I INPUT -i eth0 -p tcp --dport 81 -j DROP
iptables -I OUTPUT -o eth0 -p tcp --sport 81 -j DROP
然后保存
/etc/rc.d/init.d/iptables save
你可以使用lsof命令来查看某一端口是否开放.查看端口可以这样来使用.
我就以81端口为例:
lsof -i:81
如果有显示说明已经开放了.如果没有显示说明没有开放

5.环境变量

 Tomcat JVM配置--catalina.bat/catalina.sh
windows
set JAVA_OPTS = -Xmx512m -Xms512m -XX:MaxPermSize=256m
linux
JAVA_OPTS ="-server -Xmx400m -Xms400m -Xmn128m -XX:MaxPermSize=128m -XX:PermSize=128m"

6.项目直接访问

 【Tomcat直接访问项目--去掉访问路径上的项目名称】
修改Tomcat_Home/conf/server.xml
<Host> 下添加 <Context path="" docBase="项目路径" reloadable="true" />
path为访问路径,与request.getContextPath()返回值一样。

7.Nginx配置:

安装 pcre-devel openssl-devel

 http{
#...
gzip on;
gzip_min_length 1k;
gzip_buffers 16 64k;
gzip_http_version 1.1;
gzip_comp_level 4;
gzip_types text/plain text/css application/xml image/png; #...
gzip_vary on;
sendfile on;
client_max_body_size 1024m;#附件上传
upstream e_learning{
server 192.168.1.30:8080;
server 192.168.1.31:8080;
ip_hash;
}
server{
listen 80;
server_name 192.168.1.34;
index index.jsp;
location / {
index index.jsp;
proxy_pass http://e_learning;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ^~ /upload/ {
expires 10d;
root /var/e_learning;
}
location ^~ /vod {
proxy_pass http://192.168.1.36:1935/vod/;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~*\.(gif|jpg|png|js|css)$ {
expires 10d;
proxy_pass http://e_learning;
proxy_set_header Host $host;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
}

Linux服务器软件安装备忘的更多相关文章

  1. 安装 CentOS 后的系统配置及软件安装备忘

    安装 CentOS 后的系统配置及软件安装备忘 // */ // ]]>   安装 CentOS 后的系统配置及软件安装备忘 Table of Contents 1 Linux 自举过程 1.1 ...

  2. nginx1.8+php5.6.10 服务器编译安装备忘2015-06

    又要重新装一台阿里云服务器.开始想用脚本,但发现脚本的程序版本都比较低  还是手动编译最新版本 开始前 更新服务器到最新版本 #yum makecache #yum update //分区挂数据盘 # ...

  3. Sublime Text4(Build 4126) 安装备忘

    Sublime Text4(Build 4126) 安装备忘 sublime text 4126 PJ已测可用 打开浏览器进入网站https://hexed.it 打开sublime text4安装目 ...

  4. MSDE2008安装备忘

    MSDE2008安装备忘(适用于WIN7 8 10) 1.系统中必须要VC8.0,即VC2005运行库.2.系统中必须要有.net framework2.0.3.5.4.6运行库.3.windows防 ...

  5. CentOS安装备忘2

    CentOS7安装备忘2 安装过程中不联网,安装完成也不要立刻联网,先关闭远程的服务后再联网更新.安装默认使用English,目的是生成的Home下所有文件夹都是英文的,方便使用. ========= ...

  6. Linux课程---3、Linux远程登录和传输(操作Linux服务器软件)

    Linux课程---3.Linux远程登录和传输(操作Linux服务器软件) 一.总结 一句话总结: xshell:Xshell是一个强大的安全终端模拟软件 Xshell是一个强大的安全终端模拟软件, ...

  7. Linux中软件安装包的格式

    一.Linux常用安装包及安装方法 1.安装包一般有四类: 1)tar包,如software-1.2.3-1.tar.gz.他是使用UNIX系统的打包工具tar打包的. 2)rpm包,如softwar ...

  8. CentOS7安装备忘

    ======1 下载CentOS镜像文件:https://www.centos.org/download/http://isoredirect.centos.org/centos/7/isos/x86 ...

  9. WRF 安装备忘

    ▶ n 年前在笔记本上安装 WRF 的一个过程 ● 安装 cpp,csh,m4,quota,samba # apt-get install cpp csh m4 quota samba ● 网上教程有 ...

随机推荐

  1. nefu 519 昨日重现

    昨日重现 Problem : 519 Time Limit : 1000ms Memory Limit : 65536K description 兴安黑熊在高中学习数学时,曾经知道这样一个公式:f(n ...

  2. TextUtils

    /** * 计算关键字在文本中出现的次数 * @param text * @param key * @return */ public static int count(String text, St ...

  3. SQL 合并列值和拆分列值

    合并列值 表结构,数据如下: id value ----- ------ aa bb aaa bbb ccc 需要得到结果: id values ------ ----------- aa,bb aa ...

  4. sql server多行数据(一列)转换成一个字段

    create table #test ( id int not null, memeo int not null ) ,) ,) ,) )) ,,'') drop table #test 总结: 格式 ...

  5. HTML day01基础总结

    1.网页的基本元素 文字.图像与超链接. 2.每一个网页元素通常由开始标记.结束标记,以及在这两个标记中的内容所组成. 3.一般结构 <html> <head> <met ...

  6. Spring MVC中,事务是否可以加在Controller层

    一般而言,事务都是加在Service层的,但是爱钻牛角尖的我时常想:事务加在Controller层可不可以.我一直试图证明事务不止可以加在Service层,还可以加在Controller层,但是没有找 ...

  7. 一个不错的PHP文件页面缓存类

    在php中缓存分类数据库缓存,文件缓存和内存缓存,下面我来给各位同学详细介绍PHP文件缓存类实现代码,有需要了解的朋友可参考. 页面缓存类 <?php    /*    * 缓存类    cac ...

  8. linux的学习系列 7---管道和过滤器

    有时候,我们可以把两个命令连起来使用,一个命令的输出作为另一个命令的输入,这就叫做管道.为了建立管道,需要在两个命令之间使用竖线(|)连接. 管道是Linux进程之间一种重要的通信机制:除了管道,还有 ...

  9. FTP: Configuring server users..

    4 points to create a user to uploade to ftproot.. this user must be an administrator, and be able to ...

  10. div.2/D. As Fast As Possible<数学题,二分>

    题目连接 题意: n个学生出去玩,要前进一段距离,租了一辆可以载k个人的车,问到达到目的地的最短时间. cin: n,l,v1,v2,k. £:所有人一起到达终点的时候时间最短. £:所有人走路和坐车 ...