Do you really know how to deploy Linux?

image

  1. jdk installation

The first step is to upload the jdk1.6.0_45
app window to modify the permissions, cascade the lower-level directory files, and have executable permissions chmod 777 jdk1.6.0_45 The second step is to install jdk 
./jdk-6u45-linux-x64.bin The
third step to set the environment Variable
export JAVA_HOME=/app/jdk1.6.0_45
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar The
fourth step is to check whether the configuration is correct
[bgzdh@localhost app]$ java 
[bgzdh@localhost app]$ javac
[bgzdh@localhost app]$ java -version
  1. memcached installation

1. Install the dependent library libevent
1. Check whether it has been installed, command: rpm -qa|grep libevent 
2. If it is installed and the version is lower than 2.0.21, uninstall it, command: rpm -e libevent-1.4.13-4.el6 .x86_64 --nodeps
3. Install libevent, upload the installation package to a directory other than /usr, command:
tar zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix= /usr/local/libevent
make
make install
Note: 
1) Root authority may be required to execute make install. 
2) Libevent will be installed under /usr/local
4. Test whether libevent is installed successfully: ls -al /usr/local|grep libevent So
far, libevent is installed; 2. Install memcache install tar zxvf memcached-1.4.2.tar.gz
cd memcached-memcached-1.4.2
./configure --prefix=/usr/local/memcached --with-libevent=/usr/local/libevent/
make
make install
Note: 
1) Root authority may be required to execute make install. 
2) memcached will be installed under /usr/local and the
memcached installation is now complete;
3. Start the service memcache
cd /usr/local/memcached/bin ./memcached -m 100000 -d start -c 4096 ps -eaf|grep memcached display process Number four, verify that the telnet IP 11211 stats has information displayed on it.
  1. Install weblogic

Step 5 Install weblogic [bgzdh@localhost app]$ java -jar wls1036_generic.jar  Step 6 Install domain cd Oracle/Middleware/wlserver_10.3/common/bin Step 7 Authorize bgzdh's user_projects directory under chmod 777 user_projects cd user_projects /domains/base_domain/bin chmod 777 startWebLogic.sh
./startWebLogic.sh Step 8: Test whether weblogic starts the console http://20.0.2.106:7001/console

Redhat Tomcat starts automatically after booting

 

环境说明:redhat6.3企业版;tomcat-6.0.44

#1#编辑startup.sh 在最上面添加如下三行,并保存

vi /app/apache-tomcat-6.0.44/bin/startup.sh

#chkconfig:2345 80 90

#description:tomcat auto start

#processname:tomca

#2#编辑catalina.sh,在export QIBM_MULTI_THREADED=Y下面添加如下三行并保存(注意tomcat 路径要写对)

vi /app/apache-tomcat-6.0.44/bin/catalina.sh

export CATALINA_BASE=/app/apache-tomcat-6.0.44

export CATALINA_HOME=/app/apache-tomcat-6.0.44

export CATALINA_TMPDIR=/app/apache-tomcat-6.0.44

#3#添加链接

ln -s /app/apache-tomcat-6.0.44/bin/startup.sh /etc/rc.d/init.d/tomcat6

#4#检查并给执行授权

cd /etc/rc.d/init.d 

ll

chmod +x tomcat6

chmod 777 tomcat6

#5#添加开机启动服务

chkconfig --add tomcat6

#6#检查开机启动服务是否存在

chkconfig --list

  1. Linux 环境变量配置

环境说明:redhat 6.3企业版

#1#打开编辑profile并保存。

vi /etc/profile

JAVA_HOME=/usr/lib/jvm/jdk6

PATH=$PATH:$JAVA_HOME/bin

CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

export JAVA_HOME

export PATH

ecport CLASSPATH

  1. Tomcat 优化配置

#1# 打开tomcat_home/conf/server.xml,编辑保存

maxThreads="250" maxHttpHeaderSize="8192"

emptySessionPath="true" protocol="HTTP/1.1" maxThreads="1000" minSpareThreads="50" maxSpareThreads="100" acceptCount="500" />

其中:
• maxThreads:tomcat可用于请求处理的最大线程数,默认是200
• minSpareThreads:tomcat初始线程数,即最小空闲线程数
• maxSpareThreads:tomcat最大空闲线程数,超过的会被关闭
• acceptCount:当所有可以使用的处理请求的线程数都被使用时,可以放到处理队列中的请求数,超过这个数的请求将不予处理.默认100


#2# 打开tomcat_home/bin/catalina.sh,这个下边cygwin=false添加如下;(注意内存按照实际机器内存的四分之一到四分之二配置。

JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8

-server -Xms1024m -Xmx2048m

-XX:NewSize=512m -XX:MaxNewSize=512m -XX:PermSize=512m

-XX:MaxPermSize=1024m -XX:+DisableExplicitGC"

  1. Linux 系统挂载数据盘

适用系统:Linux(Redhat , CentOS,Debian,Ubuntu)

*  Linux的云服务器数据盘未做分区和格式化,可以根据以下步骤进行分区以及格式化操作。 下面的操作将会把数据盘划分为一个分区来使用。 1、查看数据盘 在没有分区和格式化数据盘之前,使用 “df –h”命令,是无法看到数据盘的,可以使用“fdisk -l”命令查看。 如下图: 友情提示: 若您执行fdisk -l命令,发现没有 /dev/xvdb 表明您的云服务无数据盘,那么您无需进行挂载,此时该教程对您不适用 2、 对数据盘进行分区 执行“fdisk -S 56 /dev/xvdb”命令,对数据盘进行分区; 根据提示,依次输入“n”,“p”“1”,两次回车,“wq”,分区就开始了,很快就会完成。 3、 查看新的分区 使用“fdisk -l”命令可以看到,新的分区xvdb1已经建立完成了。  4、格式化新分区 以ext3为例: 使用“mkfs.ext3 /dev/xvdb1”命令对新分区进行格式化,格式化的时间根据硬盘大小有所不同。 (也可自主决定选用其它文件格式,如ext4等)  5、添加分区信息 使用“echo '/dev/xvdb1  /mnt ext3    defaults    0  0' >> /etc/fstab”(不含引号)命令写入新分区信息。
然后使用“cat /etc/fstab”命令查看,出现以下信息就表示写入成功。 注: ubuntu12.04 does not support barriers, so the correct way to write it is: echo'/dev/xvdb1 /mnt ext3 barrier=0 0 0'>> /etc/fstab * If you need to mount the data disk separately to a folder, such as separate Used to store web pages, you can modify the /mnt part of the above command. 6. Mount the new partition. Use the "mount -a" command to mount the new partition, and then use the "df -h" command to view. The following message indicates that the mount is successful , You can start using the new partition.
  1. Scan QR code to follow

image

(the public)

image

(WeChat)

  1. Disclaimer

[ Writing instructions ] The above content is shared with programmers who like to program and have dreams, and hope to help you. The above article belongs to the original public account. If you need to reprint, please indicate the source.

[ Disclaimer ] This public platform is not an advertiser, nor does it advertise for other third-party websites or individuals. The source code and articles shared here are some of the projects that I think are good in the project and study. Some voluntary download or payment behaviors generated by users. Not directly related to the platform

Submission Email[email protected]

 Contributions are welcome to share your high-quality source code or articles


Guess you like

Origin blog.51cto.com/15067267/2576595