Пример #1
0
	'ftp_path' 		: 	'/lnmp/mysql',
	'soft_path'		: 	'/opt/lnmp/app',
	'soft_name'		: 	'mysql',
	'user_name'		: 	'mysql'
}

mysql_path = os.path.join(base['soft_path'],base['soft_name'])
cwd = os.getcwd()

init_package = ['ncurses-5.9.tar.gz',
				'cmake-2.8.12.1.tar.gz'
				]

soft_package = 'mysql-5.5.34.tar.gz'
# prepare work
environment_init.folder_and_user_init(base['soft_name'],base['user_name'])
environment_init.ftp_download(base['tar_base'],base['ftp_path'])
environment_init.apt_update()
environment_init.install_init()

# install init_package
os.chdir(base['tar_base'])
for soft in init_package:
	tools.extract_file(soft)
	folder_name = tools.filter(soft)
	tools.pak_configure(folder_name,folder_name,base['soft_path'],base['tar_base'])
	tools.pak_make(folder_name,base['tar_base'])

# install mysql
# extract mysql.tar
tools.extract_file(mysql_package)
Пример #2
0
# need package
init_package = ['m4-1.4.9.tar.gz',
				'autoconf-2.13.tar.gz',
				'libiconv-1.14.tar.gz',
				'libmcrypt-2.5.8.tar.gz',
				'libxml2-2.7.8.tar.gz',
				'pcre-8.30.tar.gz',
				'openssl-1.0.1e.tar.gz',
				'zlib-1.2.8.tar.gz'
				]

nginx_package = 'nginx-1.0.9.tar.gz'
# prepare work

e_init.folder_and_user_init(base['soft_name'],base['user_name'])
tools.ftp_download(base['tar_path'],base['ftp_path'])

# install init_package
os.chdir(base['tar_path'])
for soft in init_package:
	tools.extract_file(soft)
	folder_name = tools.filter(soft)
	tools.pak_configure(folder_name,folder_name,base['soft_path'],base['tar_path'])
	tools.pak_make(folder_name,base['tar_path'])
	if 'mcrypt' in soft:
		temp_base = os.path.join(base['tar_path'],folder_name)
		print temp_base
		tools.pak_configure('libltdl','libltdl',base['soft_path'],temp_base,'--enable-ltdl-install')
		tools.pak_make('libltdl',temp_base)