|
Introduction ~
—————————————–
Program (1) ~ array.sh
—————————————–
#!/bin/bash
echo “==============”
declare -a myarr[0]=”Arun”
declare -a myarr1
myarr1=(arun bagul bangalore mumbai raju santhosh)
myarr[1]=”Bagul”
echo “my name is ${myarr[0]} ${myarr[1]}”
echo “————————–”
echo “${myarr1[*]}”
echo ${myarr1[2]}
echo ${myarr1[@]}
echo “————————–”
echo “Total no of elements in array – ${#myarr1[*]}”
echo “Total no of elements in array – ${#myarr1[@]}”
echo “Size of word ‘${myarr1[2]}’ is – ${#myarr1[2]}”
echo ${#myarr1[1]}
echo ${#myarr1[0]}
echo “————————–”
#how to delete element in array
unset myarr[1]
echo “myarr is – ${myarr[*]}”
#how to assign element in array
myarr[1]=”- System Engineer!”
echo “myarr is – ${myarr[*]}”
echo ${myarr}
————————————————————————
Program (2) ~ command_line_arguments.sh
————————————————————————
#!/bin/bash
echo “Script/command name => $0″
echo “arg1 => $1″
echo “arg2 => $2″
echo “arg3 => $3″
echo “Total No of argument = $#”
echo “Script PID is => $$”
echo “Status of previous command – $?”
name=$myname
echo “Name – $name”
read n
————————————————-
Program (3) ~ default_value.sh
————————————————-
#!/bin/bash
#start=’123′
#start=${1:-$start}
start=${1:-’123′}
echo “Value of ‘start’ variable is ==> $start”
—————————————————
Program (4) ~ echo_example.sh
—————————————————
#!/bin/bash
name=”Arun”
echo -e “My Name is $name_arun and \n”
echo -e “My Name is ${name}_arun and \n”
echo -e ‘My Name is $name and \n’
—————————————–
Program (5) ~ elif.sh
—————————————–
#! /bin/bash
if [ $1 -eq $2 ];then
echo “good”
elif [ $2 -eq $3 ];then
echo “Fine”
elif [ $1 -eq $3 ];then
echo “OK”
else
echo “NO”
fi
————————————————————
Program (6) ~ for_loop_example-1.sh
————————————————————
#!/bin/bash
i=1
while [ $i -le 512 ]
do
temp=$i
echo “What is => $i | $temp”
i=$(expr $i + 32)
for (( j=$temp; $j<=$i; j++ ))
do
echo -n ” $j”
done
done
———————————————————–
Program (7) ~ for_loop_example-2.sh
———————————————————–
#!/bin/bash
#for val in $(ls -1 /tmp)
sum=0
#for val in {1..5}
#for val in {$1..$2}
for((val=$1;$val<=$2;val++))
do
#echo “$val”
sum=$(expr $sum + $val )
#sum=`expr $sum + $val`
done
echo “$0 # Sum of $1 to $2 => $sum”
————————————————————
Program (8) ~ for_loop_example-3.sh
————————————————————
#!/bin/bash
for i in {1..9}
do
echo $i
done
—————————————–
Program (9) ~ function.sh
—————————————–
#!/bin/bash
function my_function()
{
name=”Arun Bagul”
echo “‘my_function’ body ~ $name”
return 1;
}
##########
myfunc()
{
echo “Another way of defining the function”
}
##########################
echo “Starting function program”
echo “——————————”
#calling function here
my_function
##
myfunc
echo -e “\n end of program”
—————————————————————————————
Program (10) ~ how_to_pass_argument_to_function.sh
—————————————————————————————
#!/bin/bash
function my_function()
{
echo “Total number of argument ~ $#”
echo “Arg1 => $1″
echo “Arg2 => $2″
echo “Arg3 => $3″
return 0;
}
##########
echo “Starting function program”
echo “——————————”
#calling function here
my_function arun bagul 1234
————————————————————————-
Program (11) ~ how_to_take_hidden_input.sh
————————————————————————-
#!/bin/bash
echo -n “Enter User Name :”
read username
echo -n “Enter Password :”
read -s mypwd
echo -e “\nI am $username and my password is – $mypwd”
——————————————————————————
Program (12) ~ how_to_take_input_from_user.sh
—————————————————————————–
#!/bin/bash
echo -ne “Enter the Name:- ”
read name
echo -n -e “Enter the Number:- ”
read num
echo “——————————”
add=$(expr $num + 10)
echo “Name is ~ $name”
echo “Number is ~ $add”
—————————————–
Program (13) ~ ifthen.sh
—————————————–
#!/bin/bash
if [ "arun" == "arun" ];then
echo “true!”
else
echo “false”
fi
echo “———————————-”
if [ 2 == 2 ];then
echo “true!”
else
echo “false”
fi
echo “———————————-”
if [ "arun" = "arun" ];then
echo “true!”
else
echo “false”
fi
echo “———————————-”
if [ 2 -eq 2 ];then
echo “true!”
else
echo “false”
fi
——————————————————
Program (14) ~ non-interactive.sh
——————————————————
#!/usr/bin/expect -f
spawn ssh arun@192.168.0.1
expect “password:”
sleep 1
send “pwd\r”
interact
—————————————————————-
Program (15) ~ read_file_line_by_line.sh
—————————————————————-
#!/bin/bash
file_name=”/etc/hosts”
while read myvar
do
echo “Line => $myvar”
done < $file_name
echo “#################################################”
for myvar1 in $(cat $file_name)
do
echo “Line => $myvar1″
done
——————————————————
Program (16) ~ reverse-number.sh
——————————————————
#!/bin/bash
declare -a date_array
num=$1
i=$(expr $(echo $num | wc -c) – 1 )
while [ $num -gt 10 ]
do
temp=$( expr $num % 10 )
num=$( expr $num / 10);
echo “Digit($i) => $temp”
date_array[$i]=”${temp}”
i=$(expr $i – 1)
done
echo “Digit($i) => $num”
date_array[$i]=”${num}”
echo ${date_array[*]}
——————————————————–
Program (17) ~ string-operation.sh
——————————————————–
#! /bin/bash
echo “Arun Bagul:-”
string=”/root/arun/bagul/image.gif”
echo “string=> $string”
echo “String=> ${string##/*/}”
echo “String=> ${string#/*/}”
echo “String=> ${string%.*}”
echo “String=> ${string%%.*}”
#str=”/home/y/conf/arunbagul/daily_market_0.conf”
str=”${str##/*conf/}”
echo “String=> ${str%/*}”
#done
mystr=”keyword_summary_exact_arunsb”
echo $mystr
echo ${mystr%_*}
echo “$*”
—————————————–
Program (18) ~ switch.sh
—————————————–
#!/bin/bash
echo ” Switch program | arg1 => $1″
echo ” ——————————-”
case $1 in
123)
echo “Case is 123″
;;
arun)
echo “Case is ‘arun’”
;;
pri*)
echo “Case is ‘pri*’”
;;
*)
echo ” * Usage: $0 ”
echo ” Default case (nothing is matched)”
exit 0;
;;
esac
—————————————————————–
Program (19) ~ while_loop_example-1.sh
——————————————————————
#!/bin/bash
mywait=wait
while [ "${mywait}" = "wait" ]
do
echo “arun”
done
——————————————————————-
Program (20) ~ while_loop_example-2.sh
——————————————————————–
#! /bin/bash
## on command line -> i=0 && while [ $i -le 10 ] ; do echo $i; i=$(expr $i + 1); done
i=0
while [ $i -le 10 ]
do
echo $i
i=$(expr $i + 1)
done
——————————————————————–
* Please download PDF file http://www.slideshare.net/arunbagul/bash-learning-by-examples/
Regards,
Arun
介绍〜
我正打算写多条主MySQL的复制很长时间以来,终于开始了!。请参阅“的文章:如何配置MySQL复制一个法师”网址〜 http://www.indiangnu.org/2007/mysql-replication-one-master-multiple-slave/
*请让我告诉大家,在MySQL中的多主复制纯粹是基于以下两个变量。它没有任何关系,在MySQL的复制使用复制技术…。
mysql> show variables like ‘%increment_%’;
+——————————-+——-+
| Variable_name | Value |
+——————————-+——-+
| auto_increment_increment | 1 |
| auto_increment_offset | 1 |
+——————————-+——-+
2 rows in set (0.00 sec)
mysql>
** Requirements ~
a) Master Hosts (2 master in my case) ~
master-1 => 10.66.66.194
master-2 => 10.66.90.135
b) Replication Slave (1 slave) ~
Slave => 10.66.75.137
c) MySQL server (with replication support)
** Let us understand how it works ?
* Master-1 Server =>
Set following variables…
mysql> set auto_increment_increment=5;
mysql> set auto_increment_offset=1;
mysql> show variables like ‘%increment_%’;
+————————–+——-+
| Variable_name | Value |
+————————–+——-+
| auto_increment_increment | 2 |
| auto_increment_offset | 1 |
+————————–+——-+
2 rows in set (0.00 sec)
mysql>
** Create Table ~
mysql> create table class ( rollno INT(5) NOT NULL PRIMARY KEY AUTO_INCREMENT , name VARCHAR(30) );
** Add Record now ~
mysql> INSERT INTO class VALUES (”,’Arun Bagul’);
mysql> INSERT INTO class VALUES (”,’Ravi Bhure’);
mysql> INSERT INTO class VALUES (”,’Karthik Appigita’);
mysql> INSERT INTO class VALUES (”,’Ameya Pandit’);
mysql> SELECT * FROM class;
+——–+——————+
| rollno | name |
+——–+——————+
| 1 | Arun Bagul |
| 3 | Ravi Bhure |
| 5 | Karthik Appigita |
| 7 | Ameya Pandit |
+——–+——————+
4 rows in set (0.00 sec)
mysql>
* Master-2 Server =>
Set following variables…
mysql> set auto_increment_increment=2;
mysql> set auto_increment_offset=2;
mysql> show variables like ‘%increment_%’;
+————————–+——-+
| Variable_name | Value |
+————————–+——-+
| auto_increment_increment | 2 |
| auto_increment_offset | 2 |
+————————–+——-+
2 rows in set (0.00 sec)
mysql>
** Create Table ~
mysql> create table class ( rollno INT(5) NOT NULL PRIMARY KEY AUTO_INCREMENT , name VARCHAR(30) );
** Add Record now ~
mysql> INSERT INTO class VALUES (”,’Nilkanth Parab’);
mysql> INSERT INTO class VALUES (”,’Nishit Shah’);
mysql> INSERT INTO class VALUES (”,’Ram Krishna’);
mysql> INSERT INTO class VALUES (”,’Suhail Thakur’);
mysql> SELECT * FROM class;
+——–+——————+
| rollno | name |
+——–+——————+
| 2 | Nilkanth Parab |
| 4 | Nishit Shah |
| 6 | Ram Krishna |
| 8 | Suhail Thakur |
+——–+——————+
4 rows in set (0.00 sec)
mysql>
** What is the importance of “auto_increment_increment” and “auto_increment_offset” ~
mysql> desc class;
+——–+————-+——+—–+———+—————-+
| Field | Type | Null | Key | Default | Extra |
+——–+————-+——+—–+———+—————-+
| rollno | int(5) | NO | PRI | NULL | auto_increment |
| name | varchar(30) | YES | | NULL | |
+——–+————-+——+—–+———+—————-+
auto_increment_offset => This is BASE value for column with “auto_increment” attribute (please refer the above example)
auto_increment_increment => This is the increment value for column with “auto_increment” attribute
** If you combine the both tables (master-1 and master-2) the final table will look like this ~
mysql> SELECT * FROM class;
+——–+——————+
| rollno | name |
+——–+——————+
| 1 | Arun Bagul |
| 2 | Nilkanth Parab |
| 3 | Ravi Bhure |
| 4 | Nishit Shah |
| 5 | Karthik Appigita |
| 6 | Ram Krishna |
| 7 | Ameya Pandit |
| 8 | Suhail Thakur |
+——–+——————+
8 rows in set (0.00 sec)
mysql>
** This is how Multi master replication works….
auto_increment_offset=Nth master server
auto_increment_increment=M
凡 -
ñ =“的主服务器的第n位(硕士- 1保持1和掌握- 2保持2等等..)
m等于“总数的主服务器(2在我们的例子,但更好地保持这种价值高,使我们可以添加新的主服务器容易)
登录奴隶更新=“从服务器不登录自己的二进制日志中的任何一个主服务器接收更新。这个选项告诉奴隶登录其SQL线程执行它自己的二进制日志的更新。
**请确保MySQL正在运行,并且建立在所有主服务器和从服务器
如何设置多主MySQL的复制? -
Step 1] Create Database/Tables on Master & Slave Servers -
You can create DB on all master & slave server or create on one server and export that DB on rest of all servers…
Master-1 => Create DB and Table
mysql> create database student;
mysql> use student;
mysql> create table class ( rollno INT(5) NOT NULL PRIMARY KEY AUTO_INCREMENT , name VARCHAR(30) );
mysql> show tables;
+——————-+
| Tables_in_student |
+——————-+
| class |
+——————-+
1 row in set (0.00 sec)
mysql> desc class;
+——–+————-+——+—–+———+—————-+
| Field | Type | Null | Key | Default | Extra |
+——–+————-+——+—–+———+—————-+
| rollno | int(5) | NO | PRI | NULL | auto_increment |
| name | varchar(30) | YES | | NULL | |
+——–+————-+——+—–+———+—————-+
2 rows in set (0.00 sec)
mysql> SELECT * FROM class;
Empty set (0.00 sec)
mysql>
* Now take dump of “student” DB and export it on all master and Slave server…
[root@master-1~]# mysqldump -u root -p -d student > /home/arunsb/student.sql
* SCP the dump file on master-2 and slave server ~
[root@master-1~]# scp /home/arunsb/student.sql arunsb@10.66.90.135:/tmp/student.sql
[root@master-1~]# scp /home/arunsb/student.sql arunsb@10.66.75.137:/tmp/student.sql
Login on master-2 and slave ~
mysql> create database student;
[root@master-2~]# mysql -u root -p student < /tmp/student.sql
Enter password:
[root@master-2~]#
[root@master-2~]# mysql -u root -p
Enter password:
mysql> use student
mysql> SELECT * FROM class;
Empty set (0.00 sec)
mysql>
** Please repeat the same steps on Slave server as well…
Step 2] Update “my.cnf” config file on master-1,master-2 and slave server -
[root@master-1~]# cat /etc/my.cnf
###########################
##MySQL replication setting
#Master setting(1)
server-id = 1
log-bin = /var/log/mysql/binary/mysql-bin.log
binlog-do-db = student
binlog-ignore-db = mysql
#log = /var/log/mysql/mysql.log
auto_increment_offset=1
auto_increment_increment=5
log-slave-updates
##slave setting
master-port=3306
master-host=10.66.90.135
master-user=replication
master-password=mypwd
master-connect-retry=60
replicate-do-db=student
###########################
[root@master-1~]#
[root@master-2~]# cat /etc/mysql/my.cnf
###########################
##MySQL replication setting
#Master setting(2)
server-id = 2
log-bin = /var/log/mysql/binary/mysql-bin.log
binlog-do-db=student
binlog-ignore-db = mysql
log = /var/log/mysql/mysql.log
auto_increment_offset=2
auto_increment_increment=5
log-slave-updates
##slave setting
master-port=3306
master-host=10.66.66.194
master-user=replication
master-password=mypwd
master-connect-retry=60
replicate-do-db=student
###########################
[root@master-2~]#
* please create directory for binary log and set permission…
[root@master-1~]# mkdir -p /var/log/mysql/binary/
[root@master-1~]# chown mysql:adm /var/log/mysql/ /var/log/mysql/binary/
[root@master-2~]# mkdir -p /var/log/mysql/binary/
[root@master-2~]# chown mysql:adm /var/log/mysql/ /var/log/mysql/binary/
** MySQL Replication Slave ~
[root@slave~]# cat /etc/my.cnf
[mysqld]
########################################
##slave setting
server-id=4
master-port=3306
master-host=10.66.90.135
master-user=replication
master-password=mypwd
master-connect-retry=60
replicate-do-db=student
########################################
[root@slave~]#
Step 3] Give Replication permission on both masters ~
** Master (1 & 2) ~
mysql> GRANT REPLICATION SLAVE ON *.* TO ‘replication’@’10.66.%.%’ IDENTIFIED BY ‘mypwd’;
Query OK, 0 rows affected (0.00 sec)
mysql>
Step 4] Restart MySQL on both master as well as replication slave server ~
** Please verify setting on master-1 and master-2 server…
* Master-1
mysql> show variables like ‘%increment_%’;
+————————–+——-+
| Variable_name | Value |
+————————–+——-+
| auto_increment_increment | 5 |
| auto_increment_offset | 1 |
+————————–+——-+
2 rows in set (0.00 sec)
* Master-2
mysql> show variables like ‘%increment_%’;
+————————–+——-+
| Variable_name | Value |
+————————–+——-+
| auto_increment_increment | 5 |
| auto_increment_offset | 2 |
+————————–+——-+
2 rows in set (0.00 sec)
** Please verify ‘master’ & ‘slave’ status on both masters(1 & 2) and slave -
mysql> show master status;
mysql> show slave status;
** Multi Master replication is started…
Step 5] Add few records on Master-1 & Master-2 server at same time ~
Add records on both master server at same time and check master and replication slave status as shown above….
** Add following on master-1
mysql> INSERT INTO class VALUES (”,’Arun Bagul’);
mysql> INSERT INTO class VALUES (”,’Ravi Bhure’);
mysql> INSERT INTO class VALUES (”,’Karthik Appigita’);
mysql> INSERT INTO class VALUES (”,’Ameya Pandit’);
** Add following on master-2
mysql> INSERT INTO class VALUES (”,’Nilkanth Parab’);
mysql> INSERT INTO class VALUES (”,’Nishit Shah’);
mysql> INSERT INTO class VALUES (”,’Ram Krishna’);
mysql> INSERT INTO class VALUES (”,’Suhail Thakur’);
** Please verify the numbers of records on both masters and slave….
mysql> SELECT * FROM class;
+——–+——————+
| rollno | name |
+——–+——————+
| 1 | Arun Bagul |
| 2 | Nilkanth Parab |
| 6 | Ravi Bhure |
| 11 | Karthik Appigita |
| 16 | Ameya Pandit |
| 17 | Nishit Shah |
| 22 | Ram Krishna |
| 27 | Suhail Thakur |
+——–+——————+
8 rows in set (0.00 sec)
mysql>
*所以,我们都学会了配置多主MySQL的复制。享受!
关心,
Arun Bagul
简介 -
*“rpmbuild”工具用来建立两个…
1)〜用二进制包安装软件和支持脚本。它包含的文件,包括申请,连同任何其他信息,需要安装和清除它。
2)源码包〜包含源代码,补丁和规范文件的原始压缩的tar文件。
*什么是转&RPM软件包管理器?
RPM软件包管理器(转)是一个功能强大的命令行包管理系统能够安装,卸载,验证,查询和更新软件包。
RPM软件包包括一个存档文件和元数据用于安装和删除的档案文件。元数据包括辅助脚本,文件属性,以及有关包装的描述性信息。
*建立一个RPM软件包你需要指定三件事〜
1)来源的应用 – 在任何情况下,你不应该修改包建设过程中使用的来源。
2)补丁 – 转速使您能够自动应用补丁给他们。该补丁解决了问题,具体到目标系统。这可能包括改变makefile文件安装到适当的目录,或解决跨平台的应用程序冲突。创造适当的修补程序编译所需的环境。
3)规范文件 – 该规范文件是在RPM软件包建设进程的核心。它包含了RPM的要求建立包,并指示告诉转速怎样建设社会主义的信息。该规范文件也决定了哪些文件是一揽子的一部分,他们应该被安装。
**规格文件〜分为如下所示为8节
1)序言〜包含的信息将显示当用户请求对包的信息。这将包括包的功能描述,该软件的版本号等
b)筹备〜那里的建设方案实际工作开始。顾名思义,这一节是在有必要的准备工作之前作出实际的软件建设。一般来说,如果有什么需要做的来源之前,建设软件,它需要发生在准备一节。本节的内容是一个普通的shell脚本。然而,转速确实提供两个宏,使生活更轻松。一个宏可以解压缩tar文件,并到源目录cd。其他宏可以容易地应用补丁的解来源。
c)建立〜本节的一个shell脚本组成。它是用来执行任何命令,必须像一个真正编译的来源作出命令,或更复杂,如果在生成过程需要它。没有宏本节可用。
四)安装〜本节还包含一个shell脚本,安装部分是用来执行实际安装所需软件的命令。
五)安装和卸载脚本〜它包括脚本将运行,对用户的系统,在实际安装包或删除。转速可以执行脚本前/后安装/删除软件包。
六)验证脚本〜脚本在用户的系统上执行。这是转速时执行验证程序包的正确安装。
克)清洁组〜脚本,它可以清除后建立的东西了。此脚本是很少使用,因为转速通常做得很好的清洁工作最构建环境。
h)文件清单〜包含的文件列表,将组成包。另外,一些宏可以用来控制文件安装时的属性,以及用来表示哪些文件文档,其中包含配置信息。该文件清单是非常重要的。
*** RPM的要求,为构建环境〜
甲] RPM的需要设置的目录执行建设。虽然目录的位置和名称可以更改。默认布局如下 -
根@ arunsb:〜#编号:LS -升/ usr / src下/红帽/
drwxr – XR的- × 2根4096根2007年8月25日来源=“包含原始来源,修补程序和图标文件
drwxr – XR的- × 2根4096根2007年8月25日规格=“包含规范文件
drwxr – XR的- × 2根4096根2007年8月25日建立=“目录中的源解,与软件构建
drwxr – XR的,× 8根根4096 2008年5月28日从RPMS =“包含二进制软件包文件的生成过程中产生
drwxr – XR的- × 2根4096根2007年8月25日SRPMS =“包含源包文件创建的构建过程
根@ arunsb:〜#
乙]需要出口的转用几个全局变量 -
根@ arunsb:〜#出口RPM_BUILD_DIR = / usr / src下/红帽/建设/
根@ arunsb:〜#出口RPM_SOURCE_DIR = / usr / src下/红帽/来源/
步骤1]创建规范(规格)文件〜
root@arunsb:~# head -n 50 /usr/src/redhat/SPECS/openlsm.spec
# Authority: Arun Bagul
#RPM_BUILD_DIR /usr/src/redhat/BUILD/
#RPM_SOURCE_DIR /usr/src/redhat/SOURCES/
%define MY_PREFIX /usr/local/openlsm/
## Preamble Section-
Name: openlsm
Version: 0.99
Vendor: IndianGNU.org & openlsm
Release: r45
Group: System Environment/Daemons
Packager: IndianGNU.org (http://www.indiangnu.org)
URL: http://openlsm.sourceforge.net/
Summary: openlsm Admin Server
License: GPL
%description
openlsm Admin Server is free & open source web based control panel for Linux,Unix systems.
## Preparation Section-
%prep
rm -rf ${RPM_BUILD_DIR}/openlsm-0.99-r45/
tar xvfz ${RPM_SOURCE_DIR}/openlsm-0.99-r45.tar.gz -C ${RPM_BUILD_DIR}
## Build Section-
%build
cd ./openlsm-0.99-r45/
./configure –prefix=/usr/local/openlsm –with-mysql=/usr/bin/mysql_config –enable-internal-pcre –with-geoip=/usr –with-ldap=/usr –enable-trace
make
## Install Section-
%install
cd ./openlsm-0.99-r45/
make install
## Files Section-
%files
/usr/local/openlsm
/usr/local/openlsm/etc/openlsm/openlsm.conf
/usr/local/openlsm/etc/openlsm/openlsm.conf.perf_sample
/usr/local/openlsm/etc/openlsm/ssl/
/usr/local/openlsm/bin/openlsm-config
….
…..
….. list of files installed by pkg
root@arunsb:~#
*你如何创建文件列表?
创建文件列表手动过程。我所做的是我从我的手工安装前缀目录中的文件列表中找到命令,如下所示…
根@ arunsb:〜#找到/ usr /本地/ openlsm /型的F -或- D型
步骤2]开始生成〜
root@arunsb:~# cd /usr/src/redhat/SPECS
root@arunsb:/usr/src/redhat/SPECS# ls -l openlsm.spec
-rw-r–r– 1 root root 12938 Dec 2 17:21 openlsm.spec
root@arunsb:/usr/src/redhat/SPECS#
root@arunsb:/usr/src/redhat/SPECS# rpmbuild -ba openlsm.spec
…
…。
… ..
检查包装的文件(补):/ usr / lib /转速/检查文件%(buildroot)
说:/ usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
说:/ usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
根@ arunsb:/ usr / src下/红帽/回声规格#$?
0
根@ arunsb:/ usr / src下/红帽/规格#编号:LS -升/ usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
刻录- R – R间- 1根根3206年12月2 17:50 / usr/src/redhat/SRPMS/openlsm-0.99-r45.src.rpm
根@ arunsb:/ usr / src下/红帽/规格#编号:LS -升/ usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
刻录- R – R间- 1根根3052868 12月2日17:50 / usr/src/redhat/RPMS/i386/openlsm-0.99-r45.i386.rpm
根@ arunsb:/ usr / src下/红帽/规格#
*源代码和二进制包创建!
**让我们看看发生在“/ usr / src下/红帽/”目录
根@ arunsb:/ usr / src目录/红帽#密码
/ usr / src目录/红帽
根@ arunsb:/ usr / src目录/红帽#提单
建立制造系统源规格SRPMS
根@ arunsb:/ usr / src目录/红帽#提单建设/
openlsm – 0.99 – r45“==源提取这里作为构建规范文件的说明部分,即”openlsm.spec“
根@ arunsb:/ usr / src目录/红帽#提单源/
openlsm – 0.99 – r45.tar.gz“==原’openlsm – 0.99 – r45.tar.gz’源文件复制到我
根@ arunsb:/ usr / src目录/红帽#提单制造系统/
速龙的I386的i486 i586 i686 noarch
根@ arunsb:/ usr / src目录/红帽#提单RPMS/i386 /
openlsm – 0.99 – r45.i386.rpm“==二进制rpm包创建!
根@ arunsb:/ usr / src目录/红帽#提单SRPMS /
openlsm – 0.99 – r45.src.rpm“==源rpm包创建!
根@ arunsb:/ usr / src目录/红帽#
第三步]现在安装的封装和测试它〜
根@ arunsb:/ usr / src目录/ Redhat的#处长RPMS/i386/openlsm-0.99-r45.i386.rpm /家庭/ arunsb /
根@ arunsb:/ usr / src目录/红帽#的CD /家庭/ arunsb /
根@ arunsb:〜#储蓄
openlsm – 0.99 – r45.i386.rpm
根@ arunsb:〜#转脑室内出血openlsm – 0.99 – r45.i386.rpm
准备… ########################################### [100%]
1:openlsm ########################################### [100%]
根@ arunsb:〜#执行ls / usr /本地/ openlsm /
拉登的contrib等包括lib sbin脚本分享功
根@ arunsb:〜#
**启动openlsm服务器〜
根@ arunsb:〜#/ usr /本地/ openlsm /的contrib / openlsm,红帽启动
*启动openlsm管理服务器:openlsm
。 [行]
根@ arunsb:〜#
根@ arunsb:〜#/ usr /本地/ openlsm /的contrib / openlsm,RedHat的地位
openlsm(的PID 21607)正在运行…
根@ arunsb:〜#
根@ arunsb:〜#转- Q表openlsm – 0.99 – r45
openlsm – 0.99 – r45
根@ arunsb:〜#
根@ arunsb:〜#转查询语言openlsm – 0.99 – r45
..
…
根@ arunsb:〜#转- qiv的openlsm – 0.99 – r45
名称:openlsm重定位:(不重定位)
版本:0.99供应商:IndianGNU.org&openlsm
发布:r45生成日期:星期三2009年12月2日下午5时50分54秒北京时间
安装日期:星期三2009年12月2日下午六时06分23秒北京时间生成主机:alongseveral – dr.eglbp.corp.yahoo.com
组:系统环境/守护程序源RPM:openlsm – 0.99 – r45.src.rpm
大小:14877918许可:GPL
签名:(无)
包装:IndianGNU.org(http://www.indiangnu.org)
网址:http://openlsm.sourceforge.net/
摘要:openlsm管理服务器
描述:
openlsm管理服务器是免费和开放源码的基于Web的Linux,Unix系统的控制面板。
根@ arunsb:〜#
**注意〜这篇文章中没有关于如何界定百万分之一,如何复制文件资料,手册页的默认位置,如何设置permision和所有权等我将在下篇文章的转速此议题。
**请参阅英文文章 〜 http://www.indiangnu.org/2009/how-to-create-or-build-rpm-package/
关心,
Arun Bagul