Linux工具安装配置
1、修改主机名/添加别名访问
修改/etc/sysconfig/network中的hostname
NETWORKING=yes
HOSTNAME=dlserver01;
修改/etc/hosts文件
172.16.50.123 dlserver01 # Added by NetworkManager
127.0.0.1 localhost.localdomain localhost
::1 dlserver01 localhost6.localdomain6 localhost6
172.16.50.124 dlserver02
172.16.50.125 dldb01
2、时间设置
设置时区
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
date -R
date -s 20140915
date -s 15:57:30
3、jdk
3.1、
/etc/profile
export JAVA_HOME=/usr/lib/jvm/java-7
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
3.2、
chmod 777 bin
source ~/.bashrc
3.3、
java -version
4、tomcat
tar zxvf apache-tomcat-6.0.39.tar.gz
4.1、server.xml 8080 -- 8081
4.2、tomcat-users.xml
<role rolename="tomcat"/>
<role rolename="role1"/>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="admin" password="admin" roles="manager"/>
4.2、配置开机自动启动
vi /etc/rc.local
export JAVA_HOME=/usr/lib/jvm/java-7
/dinglicom/tomcat/bin/startup.sh
4.3、其它机器不能访问,开启8080端口或者关闭防火墙
4.3.1、 开启8080端口。
在/ect/sysconfig下编写iptables文件
加入一行
-A RH-Firewall-1-INPUT –m state NEW –m tcp –p tcp –dport 8080 –j ACCEPT
4.3.2、关闭防火墙
(1)关闭立即生效,重启后又开启
service iptables stop
同理:立即开启 service iptable start
(2)重启后生效
chkconfig iptables off
同理:重启后开启 chkconfig service on
第一处端口修改:
<!-- 修改port端口:18006 俩个tomcat不能重复,端口随意,别太小-->
<Server port="18006" shutdown="SHUTDOWN"> 第二处端口修改:
<!-- port="18081" tomcat监听端口,随意设置,别太小 -->
<Connector port="18081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" /> 第三处端口修改:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
5、yum
5.1、http://blog.itpub.net/25313300/viewspace-708509/
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-cron-3.2.29-40.el6.centos.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
rpm -ivh yum-cron-3.2.29-40.el6.centos.noarch.rpm rpm -ivh yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm
5.2、更新repo文件
mv /etc/yum.repos.d/rhel-debuginfo.repo /etc/yum.repos.d/rhel-debuginfo.repo.repo.bak
vi /etc/yum.repos.d/rhel-debuginfo.repo
内容为:
[base]
name=CentOS-$releasever - Base
baseurl=http://mirrors.163.com/centos/6/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://mirrors.163.com/centos/6/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
#[addons]
#name=CentOS-$releasever - Addons
#baseurl=http://mirrors.163.com/centos/$releasever/addons/$basearch/
#gpgcheck=1
#gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://mirrors.163.com/centos/6/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://mirrors.163.com/centos/6/centosplus/$basearch/
gpgcheck=1
enabled=0
6、MySQL(linux下使用yum安装mysql)
1、安装
查看有没有安装过:
yum list installed mysql*
rpm -qa | grep mysql*
查看有没有安装包:
yum list mysql*
安装mysql客户端:
yum install mysql
安装mysql 服务器端:
yum install mysql-server
yum install mysql-devel
2、启动&&停止
数据库字符集设置
mysql配置文件/etc/my.cnf中加入default-character-set=utf8
启动mysql服务:
service mysqld start或者/etc/init.d/mysqld start
停止:
service mysqld stop
开机启动
chkconfig --list
> chkconfig mysqld off
> chkconfig mysqld on
2、登录
创建root管理员:
mysqladmin -u root password zxc
登录:
mysql -u root -p输入密码即可。
忘记密码:
service mysqld stop
mysqld_safe --user=root --skip-grant-tables
mysql -u root
use mysql
update user set password=password("new_pass") where user="root";
flush privileges;
3、远程访问
开放防火墙的端口号
mysql增加权限:mysql库中的user表新增一条记录host为“%”,user为“root”。
4、Linux MySQL的几个重要目录
数据库目录
/var/lib/mysql/
配置文件
/usr/share /mysql(mysql.server命令及配置文件)
相关命令
/usr/bin(mysqladmin mysqldump等命令)
启动脚本
/etc/rc.d/init.d/(启动脚本文件mysql的目录)
7、nginx
7.1、rpm -ivh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
7.2、查看yum的nginx信息
yum info nginx
7.3、安装并启动nignx
[root@server ~]# yun install nignx
[root@server ~]# service nginx start
Starting nginx: [ OK ]
7.4、然后进入浏览器,输入http://192.168.128.134/测试,如果看到
Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.
Thank you for using nginx.
恭喜你,你成功了!
nginx.conf
upstream 192.168.128.137{
server 192.168.128.137:8081;
#server 192.168.128.137:9081;
}
server {
listen 80;
server_name 192.168.128.137;
location / {
#root /dsm;
index index.html index.htm index.jsp;
proxy_connect_timeout 3;
proxy_send_timeout 30;
proxy_read_timeout 30;
proxy_pass http://192.168.128.137;
}
}
-- 停止
nginx -s stop
-- 重启
/usr/sbin/nginx
-- 验证
nginx -t
问题:还是不晓得怎么配置到tomcat里的具体应用
7、web.py
wget http://webpy.org/static/web.py-0.37.tar.gz
python setup.py install
安装flup来提供WSGI接口(WSGI是Python应用程序和Web服务器之间的一种接口,类似于java的Servlet
wget http://www.saddi.com/software/flup/dist/flup-1.0.2.tar.gz
python setup.py install
-- 数据库
http://initd.org/psycopg/ 下载psycopg2-2.5.4.tar.gz
yum install postgresql-server
yum install postgresql-devel
8、nmon
chmod 777 nmon
./nmon –fT –s 5 –c 100
0m Use these keys to toggle statistics on/off: 00m
c = CPU l = CPU Long-term - = Faster screen updates 00m
m = Memory j = Filesystems + = Slower screen updates 00m
d = Disks n = Network V = Virtual Memory 00m
r = Resource N = NFS v = Verbose hints 00m
k = kernel t = Top-processes . = only busy disks/procs 00m
h = more options q = Quit 0
Linux工具安装配置的更多相关文章
- Linux工具安装配置之Oracle
对于Oracle的安装真的是心生恐惧,特别是一堆堆的依赖包.趁这次DBA在南京,实际操作一番. 两种方式,1.全新安装:2.硬拷贝 全新安装,参考下面这个介绍 http://www.cnblogs.c ...
- 阿里云服务器Linux CentOS安装配置(二)yum安装svn
阿里云服务器Linux CentOS安装配置(二)yum安装svn 1.secureCRT连接服务器 2.先创建一个文件夹,用来按自己的习惯来,用来存放数据 mkdir /data 3.yum安装sv ...
- 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器
阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 我在阿里云购买的服务器配置 CPU:1核 内存:2G 系统盘:40G 公共镜像:CentOS 6.5 64位 公网带宽:1Mbps ...
- (转载)Linux下安装配置MySQL+Apache+PHP+WordPress的详细笔记
Linux下安装配置MySQL+Apache+PHP+WordPress的详细笔记 Linux下配LMAP环境,花了我好几天的时间.之前没有配置过,网上的安装资料比较混乱,加上我用的版本问题,安装过程 ...
- Java开发环境及工具安装配置
Java开发环境及工具安装配置 Windows JDK 下载地址 https://www.oracle.com/java/technologies/javase-downloads.html 安装配置 ...
- 阿里云服务器Linux CentOS安装配置(零)目录
阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...
- 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署
阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...
- 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定
阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...
- 阿里云服务器Linux CentOS安装配置(七)域名解析
阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...
随机推荐
- (转) c/c++调用libcurl库发送http请求的两种基本用法
libcurl主要提供了两种发送http请求的方式,分别是Easy interface方式和multi interface方式,前者是采用阻塞的方式发送单条数据,后者采用组合的方式可以一次性发送多条数 ...
- SQL的Join语法
对于SQL的Join,在学习起来可能是比较乱的.我们知道,SQL的Join语法有很多inner的,有outer的,有left的,有时候,对于Select出来的结果集是什么样子有点不是很清楚.Codin ...
- [转]Linux Swap交换分区、交换文件
free -m 在日常应用中,通过上述命令看到交换空间的使用情况为0,那么你就不需要很大的虚拟内存,甚至可以完全不需要另辟硬盘空间作为虚拟内存.那么,万一有一天你需要了呢,难道要重装系统?大可不必,在 ...
- SQL获取本周,上周,本月,上月第一天和最后一天[注:本周从周一到周天]
DECLARE @ThisWeekStartTime NVARCHAR(100),@ThisWeekEndTime NVARCHAR(100),--本周 @LastWeekStartTime NVAR ...
- 推荐一款优秀的代码编辑软件--Source Insight
“工欲善其事,必先利其器”,好的工具能够提高我们办事的效率,进而提升团队乃至企业的竞争力. 对于软件开发工程师来说,选择一款优秀的代码编辑软件也是很重要的.最近,我看到有很多同事还在用微软的VC ++ ...
- java反射的补充:桥接方法以及Spring中一些工具类
在上一篇博文中:http://www.cnblogs.com/guangshan/p/4660564.html 源码中有些地方用到了 this.bridgedMethod = BridgeMethod ...
- c# 求两个数中最大的值
1.三元运算符: class Program { static void Main(string[] args) { ,); Console.WriteLine("最大数:{0}" ...
- 《Beginning Java 7》 - 5 - Hash Codes 哈希码
哈希码和 equals() 都是用来比较的. 1. 哈希码的作用是用来提高比较的效率.因为当比较的对象比较复杂时,equals() 可能很耗时,但哈希码只需要比较一个 int .哈希码常用于集 (se ...
- Template 动画
如果设置Template的动画,也就意味着对每一个具有此Template的对象进行动画处理. 比如对ListBoxI的ItemTemplate进行设置,添加动画,触发器等,每一个ListBoxItem ...
- NOIP simulation
NOIP 模拟赛Day 1题目名称LGTB 玩扫雷LGTB 学分块LGTB 打THD英文代号mine divide thd时限1 秒1 秒1 秒输入文件mine.in divide.in thd.in ...