-
Notifications
You must be signed in to change notification settings - Fork 1
promote baseImage
-
环境是centos root用户,
/chameleon/downloads 文件夹为下载存放目录(可自行设置)
所有的解压文件都都放到/chameleon目录下,如/chameleon/jdk7
-
命令行中复制、粘贴快捷键 ctrl+shift+c 、ctrl+shift+v
-
很多下载url没有具体给出,需自己获取,如jdk的url
-
xxx表示的通配符,用在文件名中 或 url路径中
yum install -y tar wget vim net-tools
cd /chameleon/downloads
tar -zxvf jdkxx.tar.gz
mv jdkxxx /chameleon/jdk7
export JAVA_HOME=/chameleon/jdk7
export PATH=$PATH:$JAVA_HOME/bin
tar -zxvf tomcat.tar.gz
mv apache-tomcat /chameleon/tomcat7
/chameleon/tomcat7/bin/startup.sh
会得到 index.html
curl -sL https://rpm.nodesource.com/setup | bash -
yum install -y nodejs
node -v
npm install -g pm2
cd /chameleon/downloads
tar -zxf xxx.tar.gz
mv nginx-xxx /chameleon/nginx
yum groupinstall -y "Development Tools"
gcc -v
g++ -v
make -v
./configure --prefix=/chameleon/nginx --with-http_ssl_module --with-http_stub_status_module
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/chameleon/nginx --with-http_ssl_module --with-http_stub_status_module
make && make install
/chameleon/nginx/sbin/nginx
cd /chameleon/downloads
wget http://localhost:80/
得到index.html,查看是否是nginx的主页, vim index.html 即可
cd /chameleon/downloads
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.5.tgz
tar -zxvf mongodbxxx.tgz
mv mongodbxx /chameleon/mongodb
cd /chameleon/mongodb
touch mongod.conf
bind_ip=127.0.0.1
port=27017
fork=true
dbpath=/chameleon/mongodb/data/
logpath=/chameleon/mongodb/logs/mongodb.log
mkdir /chameleon/mongodb/data
mkdir /chameleon/mongodb/logs
cd /chameleon/downloads
tar -zxvf xx.tar.gz
mv redis-xxx /chameleon/redis
cd redis-xxx
make && make install
daemonize yes
port 6379
timeout 600
logfile /chameleon/redis/logs/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
dir /chameleon/redis/data
appendonly no
maxclients 10000
maxmemory (1/2)
appendfsync everysec
mkdir /chameleon/redis/data
mkdir /chameleon/redis/logs/redis.log
/chameleon/redis/src/redis-server /chameleon/redis/redis.conf
netstat -apn
cd /chameleon/downloads
tar -zxf zookeeperxxx.tar.gz
mv zookeeperxxx /chameleon/zookeeper
cd /chameleon/zookeeper/conf/
cp zoo_sample.cfg zoo.cfg
dataDir=/chameleon/zookeeper/data
mkdir /chameleon/zookeeper/data
/chameleon/zookeeper/bin/zkServer.sh start
/chameleon/zookeeper/bin/zkServer.sh status
如果报错 , 有可能是java未设置,请 echo $JAVA_HOME 确认以下
多个docker中zookeeper集群,请另行参考
术语: ldap = light-weight directory access protocol
cn - common name
dn - distinct name
rdn - relative distinct name
dc - domain component
wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
tar -zxvf db-xxx
cd db-xxx/build_unix
../dist/configure --prefix=/chameleon/bdb
make && make install
echo '/chameleon/bdb/lib/' >> /etc/ld.so.conf
ldconfig
tar -zxbvf xx.tgz
cd openldap-2.4.39
./configure --prefix=/chameleon/openldap --with-tls=openssl --enable-bdb </br> CPPFLAGS="-I/chameleon/bdb/include" </br> LDFLAGS="-L/chameleon/bdb/lib" LD_LIBRARY_data-path="/chameleon/bdb/lib"
make depend
make
make test
make install
[参考](https://ask.fedoraproject.org/en/question/53550/how-can-i-find-a-needed-header-file/ ltdl.h is in the Debian package libltdl3-dev)
yum whatprovides '*/ltdl.h'
yum install libtool-ltdl-devel-2.4.2-20.el7
vim /chameleon/openlap/etc/openldap/slapd.conf
#####添加schema
include /chameleon/openldap/etc/openldap/schema/collective.schema
include /chameleon/openldap/etc/openldap/schema/corba.schema
include /chameleon/openldap/etc/openldap/schema/cosine.schema
include /chameleon/openldap/etc/openldap/schema/duaconf.schema
include /chameleon/openldap/etc/openldap/schema/dyngroup.schema
include /chameleon/openldap/etc/openldap/schema/inetorgperson.schema
include /chameleon/openldap/etc/openldap/schema/java.schema
include /chameleon/openldap/etc/openldap/schema/misc.schema
include /chameleon/openldap/etc/openldap/schema/nis.schema
include /chameleon/openldap/etc/openldap/schema/openldap.schema
include /chameleon/openldap/etc/openldap/schema/pmi.schema
include /chameleon/openldap/etc/openldap/schema/ppolicy.schema
suffix "dc=foss,dc=com"
rootdn "cn=Manager,dc=foss,dc=com"
#####启动服务先
./libexec/slapd
./bin/ldapadd -x -D "cn=Manager, dc=foss, dc=com" -W -f /chameleon/openldap/data/foss.ldif
可能问题是 foss.ldif中的中文字符造成的
file -i data/foss.ldif
===> 输出 data/foss.ldif: text/plain; charset=iso-8859-1
iconv -f ISO-8859-1 -t UTF-8 foss.ldif > foss1.ldif
删除foss.ldif, 重命名foss1.ldif,再导入一次
rm -f foss.lidf
mv foss1.lidf foss.lidf
./bin/ldapadd -x -D "cn=Manager, dc=foss, dc=com" -W -f /chameleon/openldap/data/foss.ldif
#####按照官网的来
cd /chameleon/downloads
wget http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.33/bin/apache-tomcat-6.0.33.tar.gz
tar -zxf apache-xxx.tar.gz
mv apache-maven-xx /chameleon/maven
vi /etc/profile
增加 env var M2_HOME M2 PATH
export M2_HOME=/chameleon/maven
export M2=$M2_HOME/bin
export PATH=$PATH:$M2