Posts

Howto setting iLOM

Change default password for "root", default = changeme set /SP/users/root password=password Create new username "admin" create /SP/users/admin Modify user profile "admin" set /SP/users/admin role=Administrator set /SP/users/admin cli_mode=alom Setting CLI prompt setsc sc_cliprompt SRVNAME

Differences between trusted and non-trusted systems?

Trusted system  : Enabled for all of below functions. Non-trusted system : Disabled for all of below functions. System auditing enables tracing every system call issued by users on the system. Improved password management includes: - grace period and expiration period for password - password aging - specific account life - disable login after repeated login failures - random password generator Login Restrictions includes : - disabling and locking accounts - Setting accounts to be accessed only at certain times of the day - account location accessat specific devices, workstations, etc. - a single-user boot password. Shadowed passwords - kept in locations other than /etc/passwd. - prevents users from viewing the /etc/passwd file - prevents hackers from running "password cracker programs" against passwords in the /etc/passwd file

Howto re-install PHP support Oracle Client

If we have default php installation in RHEL 4u6, and we need to reinstall with php5 with oracle client supported. Uninstall all PHP4 rpm rpm -qa | grep php rpm -e php-* Install PHP5 rpm rpm -ivh php-common-5*.rpm rpm -ivh php-cli-5*.rpm rpm -ivh php-5*.rpm rpm -ivh sqlite-3*.rpm rpm -ivh sqlite2-*.rpm rpm -ivh php-pdo-5*.rpm rpm -ivh php-oci8-5*.rpm Install InstantClient mkdir -p /opt/oracle/instantclient cd /opt/oracle/instantclient unzip instantclient-basic-linux32-10.2.0.3-xxx.zip unzip instantclient-sdk-linux32-10.2.0.3-xxx.zip echo /opt/oracle/instantclient/instantclient_10_2 >> /etc/ld.so.conf ldconfig cd /opt/oracle/instantclient/instantclient_10_2 ln -s libclntsh.so.10.1 libclntsh.so ln -s libocci.so.10.1 libocci.so ln -s libclntsh.so.10.1 libclntsh.so.11.1 Install oci8 cd /usr/local/src tar xzf oci8-x.x.x.tgz cd oci8-x.x.x phpize ./configure --with-oci8=shared,instantclient,/opt/oracle/instantclient/instantclient_10_2 make make install Restar...

Howto Initialized EMC Storage CLAriion

First connect your laptop to switch that EMC Storage are connected. Please make sure it have same VLAN configured on switch. For example you use VLAN 10 with allocation IP Address : 192.168.10.0/24. Set IP Address on your laptop to, ex: 192.168.10.10. EMC Storage SP A : 192.168.10.1 EMC Storage SP B : 192.168.10.2 Please note that server that will use this EMC Storage should be use VLAN 10 as main VLAN. ex: SP A on EMC Storage connected to port 1 SP B on EMC Storage connected to port 2 Your laptop connected to port 3. Switch config should be like below : interface GigabitEthernet0/1  switchport access vlan 10  switchport mode access interface GigabitEthernet0/2  switchport access vlan 10   switchport mode access interface GigabitEthernet0/3  switchport access vlan 10  switchport mode access Install Navisphere_Initialization_Wizard.exe on your laptop and run this tool. - choose "I agree ..." - Click "Next" button - Your st...

Howto physical connection EMC CLAriion, IBM Blade, SAN Switch, Cisco Switch

Image

Howto cstm on HP-UX

If we want to show all machine information, just use cstm. # cstm Running Command File (/usr/sbin/stm/ui/config/.stmrc). -- Information -- Support Tools Manager Version C.46.05 (C) Copyright Hewlett Packard Co. 1995-2002 All Rights Reserved Use of this program is subject to the licensing restrictions described in "Help-->On Version". HP shall not be liable for any damages resulting from misuse or unauthorized use of this program. cstm> Map all device in this system with : cstm> map Dev Last Last Op Num Path Product Active Tool Status === ==================== ========================= =========== ============= 1 system system (1014) Information Successful 2 memory IPF_MEMORY (1014) Information Successful ------------ We want to know info about memory information cstm>sel d 2 cstm>...

Howto configure boot device order on ILOM

To ensure the system can be installed using the DVD drive, the boot device order in the BIOS has to be configured correctly so that the DVD drive takes precedence over the internal hard drives. 1 Log into the ILOM. 2 Start the system if it is not already running: > start /SYS else reset the system: > reset /SYS 3 Log onto the system’s console: > start /SP/console 4 When prompted, press Esc 2 to enter setup. 5 Once the setup menu has loaded, navigate across to the Boot screen by using the right arrow key. 6 Using the down arrow key, select the Boot Device Priority item and press Enter. 7 Confirm that the item [CD/DVD] is higher in the list than the item [Hard Drive]. The order can be changed by selecting the relevant item and using the +/- keys to move the item up or down in the list. 8 Once the order is correct, save any changes made by pressing Esc and then navigate right to the Exit screen. Select the item Save Changes and Exit and press Enter, then confirm...

Howto configure network on ILOM

The following steps will configure the network settings for the ILOM. 1 Connect a terminal to the ILOM serial management port. 2 Power up the server. 3 When prompted, login into the ILOM as root: login: root password: changeme (this should be the default password and can be confirmed by consulting the documentation shipped with the server). 4 Set the network details for the ILOM: > set /SP/network pendingipaddress= > set /SP/network pendingipdiscovery=static > set /SP/network pendingipgateway= > set /SP/network pendingipnetmask= > set /SP/network commitpending=true 5 Try opening an SSH connection to the ILOM in order to confirm that the setup was successful.

Howto soft partition on Solaris

If we wanna create soft partition on one physical partition, eg: partition 7. Show capacity partition 7 with command # format then choose your disk, eg: disk 0, now press "0" then enter partition menu with press "p" then print partition layout, press "p" we have example for partiton 7 like this : ------------- 7 unassigned wm 207 - 1608 6.80GB (1402/0/0) 14266752 We want to create 3 soft partition with allocation like below : /opt/data : 3 GB /opt/data1 : 1 GB /opt/data2 : 2 GB Create the soft partitions: # metainit d701 -p d70 3072M # metainit d702 -p d70 1024M # metainit d703 -p d70 2048M Create a UFS file system on each of the soft partitions: # newfs /dev/md/dsk/d701 # newfs /dev/md/dsk/d702 # newfs /dev/md/dsk/d703 Add the following entries to the file /etc/vfstab: /dev/md/dsk/d701 /dev/md/rdsk/d701 /opt/data ufs 2 yes - /dev/md/dsk/d702 /dev/md/rdsk/d702 /opt/data1 ufs 2 yes - /dev/md/dsk/d703 /dev/md/rd...

System Kernel Hardening on Solaris

Just add this lines to your /etc/system file. Better to use it for high load server. set noexec_user_stack=1 set noexec_user_stack_log=1 set semsys:seminfo_semmni=100 set semsys:seminfo_semmns=1024 set semsys:seminfo_semmsl=256 set semsys:seminfo_semvmx=32767 set shmsys:shminfo_shmmax=4294967295 set shmsys:shminfo_shmmin=1 set shmsys:shminfo_shmmni=100 set shmsys:shminfo_shmseg=10

Network Hardening on Solaris

Just adding this script on your /etc/rc3.d, dont' forget to chmod it to 744. /etc/rc3.d/S100nettune #!/bin/sh # # Basic Hardening /usr/sbin/ndd -set /dev/ip ip_forward_src_routed 0 /usr/sbin/ndd -set /dev/ip ip_forwarding 0 /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q 16384 /usr/sbin/ndd -set /dev/tcp tcp_conn_req_max_q0 16384 /usr/sbin/ndd -set /dev/tcp tcp_xmit_hiwat 400000 /usr/sbin/ndd -set /dev/tcp tcp_recv_hiwat 400000 /usr/sbin/ndd -set /dev/tcp tcp_cwnd_max 2097152 /usr/sbin/ndd -set /dev/tcp tcp_ip_abort_interval 60000 /usr/sbin/ndd -set /dev/tcp tcp_rexmit_interval_initial 4000 /usr/sbin/ndd -set /dev/tcp tcp_rexmit_interval_max 10000 /usr/sbin/ndd -set /dev/tcp tcp_rexmit_interval_min 3000 /usr/sbin/ndd -set /dev/tcp tcp_max_buf 4194304 /usr/sbin/ndd -set /dev/tcp tcp_maxpsz_multiplier 10 #Oracle Required /usr/sbin/ndd -set /dev/udp udp_recv_hiwat 65535 /usr/sbin/ndd -set /dev/udp udp_xmit_hiwat 65535 # Added parameter /usr/sbin/ndd -set /dev/...

LINUX REDHAT BOOK. Now available on this site !

Do you interest in Linux Redhat ? Let's have a book of Linux Redhat on this website. Contact me : smiertx@gmail.com if you interest with this book. >> Tersedia dalam Bahasa Indonesia. >> Available on English. Here are the content list : CHAPTER 1 INSTALLATION RED HAT ENTERPRISE LINUX 4 INTRODUCTION INSTALLATION RAID AND LVM  CHAPTER 2 POST INSTALLATION RED HAT ENTERPRISE LINUX 4 KOMPILE LAST STABLE KERNEL TUNING KERNEL PARAMETER HARDENING LINUX File /etc/login/defs File /etc/security/limits.conf File /etc/pam.d/system-auth File /etc/bashrc Service running on system startup Change run-level CUSTOMIZING LINUX DESKTOP CHAPTER 3 USER DAN GROUP ADMINISTRATION ADD GROUP ADD USER CHANGE GROUP PARAMETER CHANGE USER PARAMETER SUDO CHAPTER 4 SETTING NETWORK DI LINUX SETTING HOSTNAME SETTING GLOBAL NETWORK CONFIGURATION SETTING INTERFACE NETWORK SETTING VIRTUAL IP INTERFACE NETWORK MANAGE NETWORK SERVICE NETWORK BONDING LINUX...

Mirror disk on Solaris

show disk layout on 1st harddisk partition # format 0 p p create copy of Volume Table of Contents from 1st harddisk partition # prtvtoc /dev/rdsk/c1t0d0s2 | fmthard –s - /dev/rdsk/c1t1d0s2 create metadb as database that contain all mirror configuration. slice 7 is unused partition # metadb –a –c 3 –f c1t0d0s7 c1t1d0s7 create virtual device for each slice # metainit –f d11 1 1 c1t0d0s0 # metainit –f d12 1 1 c1t1d0s0 # metainit d10 –m d11 # metainit –f d21 1 1 c1t0d0s1 # metainit –f d22 1 1 c1t1d0s1 # metainit d20 –m d21 # metainit –f d31 1 1 c1t0d0s3 # metainit –f d32 1 1 c1t1d0s3 # metainit d30 –m d31 # metainit –f d41 1 1 c1t0d0s4 # metainit –f d42 1 1 c1t1d0s4 # metainit d40 –m d41 # metainit –f d51 1 1 c1t0d0s5 # metainit –f d52 1 1 c1t1d0s5 # metainit d50 –m d51 # metainit –f d61 1 1 c1t0d0s6 # metainit –f d62 1 1 c1t1d0s6 # metainit d60 –m d61 Tell system that root actually virtual device, not slice anymore # metaroot d10 Reboot system # shutdown -g0 -i6 -y Add virtual device from...

ALOM Solaris

From konsole to alom # #. From alom to konsole sc> console Configure alom from scratch sc> setupsc After configure, you should reset alom with sc> resetsc graceful reset server sc> poweroff sc> poweron force reset sc> poweroff -f sc> poweron immediately reset sc> reset go to OpenBoot PROM sc> break show env sc> showenvirontment change alom password login sc> password

Monitor Dual Master Mysql Replication

Here are shell script for monitoring replication, resetting replication if failed, logging if replication occured. Write a file name mysqlslave.sh on /tmp directory. #!/bin/sh user=mysql_root_username passwd=mysql_root_passwd repuser=mysql_replica_username reppasswd=mysql_replica_passwd GO=1 while [ $GO=1 ]; do rf=$(mktemp) /usr/local/mysql/bin/mysql -u$user -p$passwd -e "show slave status \G" > $rf 2>&1 repl_IO=$(cat $rf|grep "Slave_IO_Running"|cut -f2 -d':') repl_SQL=$(cat $rf|grep "Slave_SQL_Running"|cut -f2 -d':') if [ "$repl_IO" != " Yes" -o "$repl_SQL" != " Yes" ] ; then /usr/local/mysql/bin/mysql -u$user -p$passwd -e "stop slave" /usr/local/mysql/bin/mysql -u$user -p$passwd -e "reset slave" rg=$(mktemp) /usr/local/mysql/bin/mysql -hserverb -u$repuser -p$reppasswd -e "show master status \G" > $rg 2>&1 filemaster=$(cat $rg|grep "File"|cu...

Dual Master Mysql Replication ( Circular Replication )

We have 2 servers that will be configured as Circular Replication. It means both servers act as master and slave to another server. After we install mysql-server on both servers, check /etc/hosts should be same as both servers. # more /etc/hosts 127.0.0.1 localhost 192.168.0.21 servera 192.168.0.22 serverb 192.168.0.23 dbhost After that try to look at /etc/my.cnf At Server A : # more /etc/my.cnf [MYSQLD] basedir = /usr/local/mysql datadir = /data/mysql/data max_connections=10000 default-character-set=utf8 default-collation=utf8_bin # InnoDB parameters set-variable = innodb_buffer_pool_size=1500M set-variable = innodb_additional_mem_pool_size=500M set-variable = innodb_log_buffer_size=10M log-bin binlog-do-db=test binlog-ignore-db=mysql server-id=1 replicate-same-server-id = 0 auto-increment_increment = 2 auto-increment_offset = 1 master-host = serverb master-user = replica master-password = slave123 master-port = 3306 expire_logs_days = 10 max_binlog_size = 500M [...

Change datadir mysql

If we want to change our datadir mysql, you should follow this steps : Stopping mysql service # /etc/init.d/mysqld stop Move or copy your original datadir directory to your new destination # mv /old/ /new/ Change ownership of new directory to user and group mysql # chown -R mysql:mysql /new/ Find your ib_logfile on new directory and delete it # rm -rf ib_logfile* Change datadir parameter on my.cnf # vi /etc/my.cnf Start your mysql server # /etc/init.d/mysql.server start

Bypass proxy on Linux environment

After we define proxy on our environment, we wanna bypass proxy for specific address. Here the way, edit your /etc/bashrc # vi /etc/bashrc --------- export http_proxy=http://aa.bb.cc.dd:xxxx export no_proxy="localhost, 10.0.0.0/8, 192.168.0.0/16, aaa.com" --------- Just relogin to your shell, and it changes. It's simple as blinking your eyes :p

LED status on HP Machine

sometimes we found our LED HP server states green, blinking yellow or red. Just visit official site .

Virtual host on proftpd

Image
If you want to create virtual host for your FTP, just edit your proftpd.conf # vi proftpd.conf Note that ip_address_1 dan ip_address_2 owned by this server. We also can configure another port that will be use for specific virtual host.