Chuyện của sys

DevOps Blog

Sysadmin nghĩ về mọi người như thế nào? July 12, 2017

Google mãi cũng ra được tấm hình http://imgur.com/vRTRP

Khi bạn làm việc trong 1 môi trường production trong vai trò của 1 system admin, bạn sẽ được tiếp xúc mà làm việc với những người như là developer, tester/QC, project manager, designer … hay chính những đồng nghiệp sysadmin như mình. Vậy trong mắt bạn, họ là những ai? Hay mọi người nghĩ gì về bạn ? Bài viết sẽ chia sẻ những suy nghĩ của bản thân mình về họ :D. Đây là ý kiến chủ quan của cá nhân của tác giả, và chỉ phù hợp với mục tiêu chém gió.
Developer
Công việc của bạn khi làm trong 1 công ty production hay outsource chủ yếu là xây dựng hệ thống và môi trường cho developer làm việc và thường gặp gỡ nhau ở môi trường sandbox. Mọi thứ đều sẽ do bạn cài đặt lên theo yêu cầu của dev hoặc dựa theo framework có sẵn của từng công ty. Dev không được tự ý thay đổi, hay tự cài đặt cho riêng mình và chỉ dùng được user có giới hạn quyền, nên trong mắt của bạn, dev chỉ là những “gã khờ”, với cái răng gãy (như hình trên), họ không thể thay đổi gì trên hệ thống ngoài code của chính họ, họ cũng không thể truy cập vào server nếu như bạn không mở firewall hay cấp quyền, mật khẩu…Đơn giản là họ cũng không thể nào shutdown hệ thống sandbox khi buồn hay đái vào server để đi ngủ khi debug giữa đêm khuya được.
Tuy nhiên, đối với bạn thì developer là người nắm rõ hệ thống, luôn được đánh giá cao bởi khả năng cày cuốc, cũng như chịu được áp lực công việc được đặt ra từ PM, họ luôn giải quyết vấn đề 1 cách chính xác và nhanh chóng, ít nhất thì cũng đúng deadline.
QC
Nhiều công ty thì QC có thể là QC, QA và đảm nhiệm luôn vai trò tester, nên mình gọi chung như vậy. Trong mắt bạn thì họ là những người có ưu điểm là chuyên bới lông tìm vết, bởi vì bug nào cũng tìm ra, issue nào cũng đánh thắng. Tới ngày release chỉ mong được cái confirm hay gật đầu của tester để được xách đích về nhà, có khi còn vui mừng hơn cả team dev.
QC thường yêu cầu bạn cài những phần mềm “xa lạ” để thực hiện quản lý bug, automation, quản lý testcase… và thường báo bug lúc 1-2h sáng và có thể thức cùng sysadmin, dev đến 5h để fix bug hay review sau khi có changes.
Designer
Trong mắt bạn thì designer là những thành phần “chả biết gì” về hệ thống, và hiếm khi đụng chạm gì tới nhau. Nhìn designer lúc nào cũng sạch sẽ, sành điệu, xài toàn hàng hiệu cũng như có gu thẫm mỹ rất khác biệt. Họ chỉ gặp bạn khi không truy cập vào được hệ thống, không commit lên SVN/Git được hay đơn giản là cái hình của họ hiển thị màu không đúng.
Còn gì tuyệt hơn khi được làm việc cùng với những bạn (nhất là nữ) xinh đẹp, dễ thương và có nhiều tài lẻ, nói chung với system admin, designer dùng để ngắm nhiều hơn là làm việc cùng 🙂
Project Manager
Đây là những tên tội phạm truy nã đích thực ( như hình vẽ), luôn có những áp lực được tạo ra bởi PM cho chúng ta. Khi hệ thống chạy tốt, họ chẳng thèm quan tâm đã làm gì, ở đâu, nhưng khi có incident hoặc wifi không vào được, họ sẽ là người tìm và xử lý chúng ta. 🙂 Khi họ trao cho chúng ta nhiều quyền lực hơn thì lại càng áp lực hơn nữa, hệ thống vận hành không tốt, người đầu tiên bị bêu đầu là bạn, còn khi hệ thống tốt thì bạn chắc chắn không phải là người đầu tiên ( có khi quên mất bạn là ai 🙂 j/k)
Làm việc với PM như chơi với cọp 🙂 Thế là đủ
System Admin
Đây là những tên đồng đội của chúng ta hàng ngày, muốn đi nhanh thì đi 1 mình, nhưng đi xa thì phải có đồng đôi. Điều đó luôn đúng và càng đúng khi chúng ta là những người system admin. Họ là những người làm thay việc chúng ta khi ta bận đi chơi với bạn gái, đi đá banh, hay sẵn sàng nhấc điện thoại lên lúc 2h sáng hoặc đang lên cơn sung trong nhà nghỉ. Đôi khi chúng ta hay cho rằng mình là Neo, nhưng thực sự thì không biết đúng hay không nữa 😀
Làm việc với nhau tốt là cách để tồn tại và phát triển trong môi trường hiện tại, nhưng sự cạnh tranh luôn xảy ra, nếu bạn không may phải làm việc 1 mình, thì chúc mừng bạn, vì chỉ có bản thân mình là đối thủ.
Bạn cứ thoải mái nghĩ về người khác, mặc kệ người khác nghĩ gì về chúng ta.
 
 

No Comments on Sysadmin nghĩ về mọi người như thế nào?
Categories: Linh tinh

Hiểu thêm về timezone và localtime trên Centos 6/7 July 10, 2017

Khi tiến hành cài đặt 1 server Centos 6/7, bạn có thể chọn cài đặt Date & Time ngay từ đầu, tuy nhiên, với 1 số VPS hay server trên cloud như Sakura, Google Cloud Engine…timezone phụ thuộc vào nơi mà bạn chọn để đặt server đó. Vì vậy, có thể thời gian của server và thời gian local của bạn không trùng khớp, nên nhất thiết cần phải đặt lại theo múi giờ mình chọn trước.
Trên Centos, thư mục /usr/share/zoneinfo/ là nơi chứa toàn bộ thông tin của các múi giờ của hệ thống.

ls /usr/share/zoneinfo/
Africa Atlantic Chile Eire GB GMT+0 Indian Japan MST Pacific PRC Singapore UTC Zulu
America Australia CST6CDT EST GB-Eire Greenwich Iran Kwajalein MST7MDT Poland PST8PDT Turkey WET
Antarctica Brazil Cuba EST5EDT GMT Hongkong iso3166.tab Libya Navajo Portugal right UCT W-SU
Arctic Canada EET Etc GMT0 HST Israel MET NZ posix ROC Universal zone1970.tab
Asia CET Egypt Europe GMT-0 Iceland Jamaica Mexico NZ-CHAT posixrules ROK US zone.tab

Và file /etc/localtime chính file thể hiện múi giờ hiện tại, thường được symlink tới 1 múi giờ chính xác được quy định trong /usr/share/zoneinfo/
Ví du:

ll /etc/localtime
lrwxrwxrwx 1 root root 30 Jun 12 01:09 /etc/localtime -> /usr/share/zoneinfo/Asia/Tokyo

Có nghĩa múi giờ hiện tại của bạn là “Asia/Tokyo”
Để thay đổi giờ hệ thống cho server của bạn, làm theo các bước sau:
Với Centos 7
Kiểm tra timzone list có sẵn trên hệ thống

timedatectl list-timezones |grep Asia| head
Asia/Aden
Asia/Almaty
Asia/Amman
Asia/Anadyr
Asia/Aqtau
Asia/Aqtobe
Asia/Ashgabat
Asia/Baghdad
Asia/Bahrain
Asia/Baku

Kiểm tra timzone hiện tại

ll /etc/localtime
lrwxrwxrwx. 1 root root 38 Apr 24 2016 /etc/localtime -> ../usr/share/zoneinfo/Asia/Ho_Chi_Minh

Thay đổi timezone bằng câu lệnh

timedatectl set-timezone Asia/Tokyo

Kiểm tra thay đổi

ll /etc/localtime
lrwxrwxrwx. 1 root root 38 Apr 24 2016 /etc/localtime -> ../usr/share/zoneinfo/Asia/Tokyo

Với Centos 6
Xóa file localtime hiện tại ( có thể backup)

rm -rf /etc/localtime

Tạo softlink tới chính xác múi giờ bạn cần

ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

Thay đổi thời gian trong clock

vi /etc/sysconfig/clock

Change ZONE=”Asia/Tokyo”

hwclock –systohc –localtime

Chúc bạn thành công.
 
 

No Comments on Hiểu thêm về timezone và localtime trên Centos 6/7
Tags:
Categories: Tài liệu

Hướng dẫn cài đặt TestLink Test Management Tool July 9, 2017

Testlink là gì?

Test-link is most widely used web based open source test management tool. It synchronizes both requirements specification and test specification together. User can create test project and document test cases using this tool. With Test-Link you can create an account for multiple users and assign different user roles. Admin user can manage test cases assignment task.
It supports both automated and manual execution of Test cases. The testers can generate Test Plan and Test Report in a fraction of the time with this tool. It supports test reports in various formats like Excel, MS word, and HTML formats. Apart from these, it also supports integration with many popular defect tracking system like JIRA, MANTIS, BUGZILLA, TRAC, etc. Since it is a web based tool, multiple users can access its functionality at the same time with their credentials and assigned roles. 
Tóm lại, Testlink là 1 công cụ hữu ích cho QA/Tester quản lý các testcase của mình, hỗ trợ cả tự động và manual, có thế kết với các công cụ tracking khác như JIRA, BUGZILLA…

TestLink Stable (NEW!!!! – 1.9.16 – Moka Pot – 20170121)

Vào thời điểm hiện tại thì bản 1.9.16 vẫn là bản Stable, hóng chờ bản 2.x nhưng có vẻ cộng đồng càng lúc càng ít người sử dụng cũng như xây dựng phiên bản mới 🙂
Việc cài đặt Testlink khá đơn giản và có tài liệu hướng dẫn khá rõ ràng, chỉ cần thực hiện step by step là có thể có 1 tool sau vài phút.
Sau đây mình sẽ hướng dẫn cài đặt bản 1.9.16 trên Centos 7
Để chạy được Testlink thì cần có những thành phần sau: database (mysql, mariadb…), php, và nginx là web server.
Thông tin:
php -version
PHP 5.6.30 (cli) (built: Jan 19 2017 22:31:39)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
MySQL Server version: 10.1.21-MariaDB MariaDB Server
/zserver/nginx/sbin/nginx -v
nginx version: nginx/1.10.0
Download: https://sourceforge.net/projects/testlink/files/TestLink%201.9/TestLink%201.9.16/testlink-1.9.16.tar.gz
tar -xvzf testlink-1.9.16.tar.gz
mv testlink-1.9.16 /zserver/
Tạo database trên mysql và chạy câu lệnh tạo database
Create a new empty MySQL database.
CREATE DATABASE testlink CHARACTER SET utf8 COLLATE utf8_general_ci;
Create user to access
GRANT ALL PRIVILEGES ON *.* TO ‘testlink’@’lab4’ identified by ‘test123’;
Install the sql into the newly created database.
mysql -u testlink -h lab4 -p testlink < /zserver/testlink-1.9.16/install/sql/mysql/testlink_create_tables.sql
mysql -u testlink -h lab4 -p testlink < /zserver/testlink-1.9.16/install/sql/mysql/testlink_create_default_data.sql
Taọ file config để chứa thông tin kết nối đến database
Config database
cat /zserver/testlink-1.9.16/config_db.inc.php

<?php // Automatically Generated by TestLink Installer

define(‘DB_TYPE’, ‘mysql’);
define(‘DB_USER’, ‘testlink’);
define(‘DB_PASS’, ‘test123’);
define(‘DB_HOST’, ‘lab4’);
define(‘DB_NAME’, ‘testlink’);
?>
Tạo thư mục để chứa logs và upload
mkdir -p /var/testlink/logs/
mkdir -p /var/testlink/upload_area/
Chú ý:
On Linux or UNIX you must change the permissions of the templates_c directory to be writable by the webserver. From the TestLink root directory run
chmod 777 gui/templates_c
Chạy php dưới user nginx.
chown -R nginx. /var/lib/php/session/
Cấu hình nginx: vi /zserver/nginx/conf/vhost/testlink.conf

server {
listen 8081;
server_name lab4;
root /zserver/testlink-1.9.16;
client_max_body_size 20M;
location / {
index index.php;
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/zserver/tmp/php-fpm.sock;
fastcgi_read_timeout 300;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ /\.ht {
deny all;
}
}

Như vậy là đã cài đặt xong, bạn có thể login vào tool bằng link sau:
Try :http://lab4:8081/login.php
Login : admin/admin
 

3 Comments on Hướng dẫn cài đặt TestLink Test Management Tool
Categories: Tài liệu

System Administrator/ System Engineer là làm gì?

Tùy từng môi trường, tùy công ty, mà chức danh System Administrator (SA) hay System Engineer (SE) sẽ làm những công việc khác nhau, đảm nhiệm nhiều “chức năng” khác nhau, từ việc thay mực máy in, kéo dây điện thoại, chặn truy cập vào trang thiendia.com… cho tới vận hành 1 hệ thống siêu lớn, cung cấp hạ tầng Cloud, quản trị database…

Dạo 1 vòng các trang tuyển dụng, thì đại khái công việc của SA/SE như sau:
Cái này của chuyên hosting

– Quản trị hệ thống máy chủ Web Hosting, Database, Windows, Linux
– Quản trị hệ thống Cloud (VMWare, Xen, Parallels, Virtuozzo)
– Làm việc Backend hỗ trợ cho đội ngũ chăm sóc khách hàng
– Nghiên cứu ứng dụng công nghệ
– Theo dõi, phân tích và xử lý sự cố
– Viết tài liệu triển khai, lập lịch và bảo trì hệ thống

Của 1 công ty Singapore nào đó

– Provide operational and maintenance support for cyber security infrastructure components like SIEM, firewalls, Endpoint systems, intrusion prevention/detection systems, etc.
– Perform corrective actions or routine preventive maintenance tasks, e.g. evaluate, test, and apply critical patches to operating systems, applications, etc.
– Analyzing, correcting and troubleshooting from fault calls remotely and onsite.

Của 1 công ty chuyên về game nào đó

Quản trị vận hành hệ thống game.
Chịu trách nhiệm về khả năng bảo mật, backup, dự phòng của hệ thống.
Chịu trách nhiệm toàn bộ hạ tầng network, servers, ứng dụng cho toàn bộ hệ thống game.
Kết hợp với team sản phẩm design hệ thống game.
Đảm bảo security của hệ thống ở mức tối ưu nhất.

Vậy đề làm được SA/SE thì phải có những kỹ năng, yêu cầu gì?
🙂 Đón xem các bài viết tiếp theo nhé.

No Comments on System Administrator/ System Engineer là làm gì?
Categories: Chuyện nghề

Linux là cái gì?

Việc cần làm đầu tiên của 1 Linux system admin đọc được tiếng Anh và hiểu được Linux là gì?

Từ điện thoại, xe hơi, siêu máy tính cho đến đồ gia dụng, tất cả đều có mặt của hệ điều hành Linux.

Linux. It’s been around since the mid ‘90s, and has since reached a user-base that spans industries and continents. For those in the know, you understand that Linux is actually everywhere. It’s in your phones, in your cars, in your refrigerators, your Roku devices. It runs most of the Internet, the supercomputers making scientific breakthroughs, and the world\’s stock exchanges. But before Linux became the platform to run desktops, servers, and embedded systems across the globe, it was (and still is) one of the most reliable, secure, and worry-free operating systems available.

Vậy nó có giống như Windows XP, Windows 7, Windows 10, MacOS X hay không? Nó bao gồm những thành phần nào? Tại sao lại sử dụng nó?

Just like Windows XP, Windows 7, Windows 8, and Mac OS X, Linux is an operating system. An operating system is software that manages all of the hardware resources associated with your desktop or laptop. To put it simply – the operating system manages the communication between your software and your hardware.
This is the one question that most people ask. Why bother learning a completely different computing environment, when the operating system that ships with most desktops, laptops, and servers works just fine? To answer that question, I would pose another question. Does that operating system you’re currently using really work “just fine”? Or are you constantly battling viruses, malware, slow downs, crashes, costly repairs, and licensing fees?

Ubuntu, Fedora, Arch … khác nhau như thế nào? tại sao lại lắm chuyện khi đưa ra 1 đống “distro”như thế?

Linux has a number of different versions to suit nearly any type of user. From new users to hard-core users, you’ll find a “flavor” of Linux to match your needs. These versions are called distributions (or, in the short form, “distros.”) Nearly every distribution of Linux can be downloaded for free, burned onto disk (or USB thumb drive), and installed (on as many machines as you like).

Nên dùng RedHat hay Ubuntu cho server của bạn? Cái nào là miễn phí hoàn toàn, cái nào phải trả tiền để mua gói dịch vụ hỗ trợ?

Which distribution you use will depend upon the answer to three simple questions:

  • How skilled of a computer user are you?
  • Do you prefer a modern or a standard desktop interface?
  • Server or desktop?

Đọc tới đây là bắt đầu rối tinh rối mù rồi, nhưng vẫn phải quyết định “thử” 1 cái nào đó phù hợp với nhu cầu của mình. Nếu như là 1 system admin hoặc muốn trở thành 1 thứ gì đó tương tự, thì hãy bắt đầu ngay và luôn. Hãy cài đặt nó 🙂

For most, the idea of installing an operating system might seem like a very daunting task. Believe it or not, Linux offers one of the easiest installations of all operating systems. In fact, most versions of Linux offer what is called a Live distribution – which means you run the operating system from either a CD/DVD or USB flash drive without making any changes to your hard drive. You get the full functionality without having to commit to the installation. Once you’ve tried it out, and decided you wanted to use it, you simply double-click the “Install” icon and walk through the simple installation wizard.

Tôi chọn Ubuntu 14.04 LTS cho laptop đang sử dụng và Centos, Ubuntu cho hệ thống máy chủ mình đang vận hành.
Tới đây thì chắc bạn cũng đang bận bịu với việc google cách cài đặt 1 hệ điều hành Linux như thế nào? hoặc là đang google dịch để hiểu bài viết trên nói gì, nhưng dù sao, thì cũng chào mừng các bạn đến 1 thế giới mới sau khi gõ “Linux là gì?”
 
 
 

No Comments on Linux là cái gì?
Tags:
Categories: Linh tinh

Install JIRA on Centos 7 October 10, 2016

1. Install JDK 1.7 :
Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html to download.
wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
tar -xvzf jdk-7u79-linux-x64.tar.gz
cp -r jdk-7u79-linux-x64 /zserver/jdk1.7.0_79
echo “export JAVA_HOME=/zserver/jdk1.7.0_79” >> /etc/profile
echo “export PATH=$PATH:$JAVA_HOME/bin” >> /etc/profile
Make sure it’s working
java -version
java version “1.7.0_79″
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
2. Install Mariadb and setup database for JIRA
yum install mariadb-*
systemctl start mariadb
ps ax |grep maria
1530 ? Sl 0:00 /usr/libexec/mysqld –basedir=/usr –datadir=/var/lib/mysql –plugin-dir=/usr/lib64/mysql/plugin
–log-error=/var/log/mariadb/mariadb.log –pid-file=/var/run/mariadb/mariadb.pid –socket=/var/lib/mysql/mysql.sock
mysqladmin -u root password ‘test123’
mysql -u root -p
MariaDB [(none)]> CREATE DATABASE jira CHARACTER SET utf8;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON jira.* TO ‘jira’@’127.0.0.1’ identified by ‘test123’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON jira.* TO ‘jira’@’172.16.74.133’ identified by ‘test123’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON jira.* TO ‘jira’@’lab1’ identified by ‘test123’;
MariaDB [(none)]> FLUSH PRIVILEGES;
3. Download JIRA 6.2.1
wget http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.2.1.zip
unzip atlassian-jira-6.2.1.zip
mv atlassian-jira-6.2.1-standalone /zserver/atlassian-jira
adduser jira
chown -R jira. /zserver/atlassian-jira
su – jira
Change JIRA_HOME in configuration file
cd /zserver/atlassian-jira
vi bin/setenv.sh
JIRA_HOME=”/home/jira/home”
vi atlassian-jira/WEB-INF/classes/jira-application.properties
jira.home = “/home/jira/home”
4. Install JDBC to connect database
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.30.tar.gz
tar -xvzf mysql-connector-java-5.1.30.tar.gz
cp -r mysql-connector-java-5.1.30/mysql-connector-java-5.1.30-bin.jar /zserver/atlassian-jira/lib/
5. Launch JIRA server with trial version
/zserver/atlassian-jira/bin/start-jira.sh
To run JIRA in the foreground, start the server with start-jira.sh -fg
executing as current user
…..
…. .NMMMD. …
.8MMM. $MMN,..~MMMO.
.?MMM. .MMM?.
OMMMMZ. .,NMMMN~
.IMMMMMM. .NMMMN. .MMMMMN,
,MMMMMM$..3MD..ZMMMMMM.
=NMMMMMM,. .,MMMMMMD.
.MMMMMMMM8MMMMMMM,
.ONMMMMMMMMMMZ.
,NMMMMMMM8.
.:,.$MMMMMMM
.IMMMM..NMMMMMD.
.8MMMMM: :NMMMMN.
.MMMMMM. .MMMMM~.
.MMMMMN .MMMMM?.
Atlassian JIRA
Version : 6.2.1
Detecting JVM PermGen support…
PermGen switch is supported. Setting to 384m
If you encounter issues starting or stopping JIRA, please see the Troubleshooting guide at http://confluence.atlassian.com/display/JIRA/Installation+Troubleshooting+Guide
Using JIRA_HOME: /home/jira/home
Server startup logs are located in /zserver/atlassian-jira/logs/catalina.out
Using CATALINA_BASE: /zserver/atlassian-jira
Using CATALINA_HOME: /zserver/atlassian-jira
Using CATALINA_TMPDIR: /zserver/atlassian-jira/temp
Using JRE_HOME: /zserver/jdk1.7.0_79
Using CLASSPATH: /zserver/atlassian-jira/bin/bootstrap.jar:/zserver/atlassian-jira/bin/tomcat-juli.jar
Using CATALINA_PID: /zserver/atlassian-jira/work/catalina.pid
Check log: tail -f /zserver/atlassian-jira/logs/catalina.out
Oct 10, 2016 5:20:33 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [“http-bio-8080”]
Oct 10, 2016 5:20:33 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 24404 ms
netstat -aonp |grep 8080
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::8080 :::* LISTEN 2709/java off (0.00/0/0)
Make to backup
cp -r atlassian-jira atlassian-jira.org
6. Start web base to configuration
http://172.16.74.133:8080/
Very easy to setup
screenshot-from-2016-10-09-212435
Choose My Own Database
screenshot-from-2016-10-09-212654
Input correct information and test connection. After that Click Next
 
 
screenshot-from-2016-10-09-212845
Import Data or config Base URL
screenshot-from-2016-10-09-212915
Add license key to your account
screenshot-from-2016-10-09-213016
Finish your setup
screenshot-from-2016-10-09-213100
First login with custom user.
7.Finish your Installation
====================================Install cracked version with =======================
1. cd Crack location
Download https://drive.google.com/drive/u/1/folders/0B0fYyi16qC6qZ2t5Uk5GWjhvbXc
cp -r atlassian-extras-2.2.2.jar /zserver/atlassian-jira-ent/atlassian-jira/WEB-INF/lib/
cp: overwrite ‘/zserver/atlassian-jira-ent/atlassian-jira/WEB-INF/lib/atlassian-extras-2.2.2.jar’? y
cd /zserver/atlassian-jira-ent/atlassian-jira/WEB-INF/classes
zip -d atlassian-bundled-plugins.zip atlassian-universal-plugin-manager-plugin-2.15.jar
zip -r /zserver/atlassian-jira-ent/atlassian-jira/WEB-INF/classes/atlassian-bundled-plugins.zip atlassian-universal-plugin-manager-plugin-2.10.1.jar
adding: atlassian-universal-plugin-manager-plugin-2.10.1.jar (deflated 11%)
2. Put it in your license
Go to http://172.16.74.133:9090/secure/admin/ViewLicense.jspa
Description=JIRA: Commercial,
CreationDate=2016-10-09,
jira.LicenseEdition=ENTERPRISE,
Evaluation=false,
jira.LicenseTypeName=COMMERCIAL,
jira.active=true,
licenseVersion=2,
MaintenanceExpiryDate=2099-12-31,
Organisation=phamportable,
SEN=SEN-L8642940,
ServerID=B6S1-IPL3-1H8L-DSNX,
jira.NumberOfUsers=-1,
LicenseID=LID-L8642940,
LicenseExpiryDate=2099-12-31,
PurchaseDate=2016-10-09
screenshot-from-2016-10-09-221857
 

No Comments on Install JIRA on Centos 7

[Fixed]omreport not displaying information September 25, 2016

Lỗi:
/opt/dell/srvadmin/sbin/omreport storage pdisk controller=0
Invalid controller value. Read, controller=0
No controllers found.
1: Kiểm tra status của Srvadmin
/opt/dell/srvadmin/sbin/srvadmin-services.sh status
/etc/init.d/instsvcdrv: line 1589: 22532 Segmentation fault      (core dumped) ${ISVCDD_SBIN_DIR}/${ISVCDD_DCHCFG_EXE} command=getsystype > /dev/null 2>&1
dcdbas (module) is running
dell_rbu (module) is running
/etc/init.d/instsvcdrv: line 1589: 22558 Segmentation fault      (core dumped) ${ISVCDD_SBIN_DIR}/${ISVCDD_DCHCFG_EXE} command=getsystype > /dev/null 2>&1
dsm_sa_datamgrd (pid 25349 25247) is running
dsm_sa_eventmgrd (pid 25304) is running
dsm_sa_snmpd (pid 25316) is running
dsm_om_shrsvcd (pid 25361) is running…
dsm_om_connsvcd (pid  25424) is running…
2: Đếm / Liệt kê các process sử dụng semaphores
ipcs -st |wc -l
1028
3: Check /var/log/messages
Jan 26 14:01:36HOSTNAME  Server Administrator (Shared Library): 22930 0 – Data Engine  A semaphore set has to be created but the system limit for the maximum number of semaphore sets has been exceeded
Jan 26 14:01:36 HOSTNAME  Server Administrator (Shared Library): 22930 0 – Data Engine  A semaphore set has to be created but the system limit for the maximum number of semaphore sets has been exceeded
3+: output của OMSM
Broadcast message from root@HOSTNAME  (Tue Jan 26 14:07:47 2016):
OMSM : The current firmware version  21.1.0-0007 is older than the required fir
mware version 21.3.1-0001 for a controller of model 0x1F34:  Controller 0 (PERC
H710P Mini)
Broadcast message from root@HOSTNAME  (Tue Jan 26 14:07:48 2016):
OMSM : Disk found is not supplied by an authorized hardware provider:  Physical
Disk 0:1:8 Controller 0, Connector 0
Broadcast message from root@HOSTNAME (Tue Jan 26 14:07:48 2016):
OMSM : Disk found is not supplied by an authorized hardware provider:  Physical
Disk 0:1:9 Controller 0, Connector 0
Root cause:
1: Do server admin sử dụng Share Library tạo Semaphore Arrays nhưng đã tới giới hạn của kernel.
Nguyên nhân tạo ra Semaphore có thể là do lỗi Segmentation fault (core dumped), hoặc crash lúc restart lại service như nginx, lib C…
Solution:
A: Có thể tăng giới hạn của ipcs lên:
sysctl -w kernel.sem=”250 32000 100 1184″
B: Thực hiện như sau:
1: Chạy script sau để xóa toàn bộ semaphore
cat kill_ipcs.sh

#!/bin/sh
ME=`whoami`
IPCS_S=`ipcs -s | egrep “0x[0-9a-f]+ [0-9]+” | grep $ME | cut -f2 -d” “`
for id in $IPCS_S; do
 ipcrm -s $id;
done

2: Restart lại srvadmin
/opt/dell/srvadmin/sbin/srvadmin-services.sh restart
3: Check lại status
/opt/dell/srvadmin/sbin/omreport storage pdisk controller=0
List of Physical Disks on Controller PERC H710P Mini (Embedded)
Tham khảo:
http://serverfault.com/questions/352026/anyone-know-how-to-fix-issues-with-omsa-on-red-hat-5-1-that-reports-no-controll
http://stackoverflow.com/questions/2143404/delete-all-shared-memory-and-semaphores-on-linux
http://serverfault.com/questions/668151/nginx-orphans-a-semaphore-on-restart-4294967295

No Comments on [Fixed]omreport not displaying information

Install MySQL Master-Slave on Centos June 17, 2016

##lab
172.16.74.129 lab2 master
172.16.74.130 lab3 slave
Install new version mysql from repo on both servers.
Download from http://repo.mysql.com/
##Newest version 5.7: http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm

wget http://repo.mysql.com/mysql-community-release-el6-4.noarch.rpm
yum localinstall mysql-community-release-el6-*.noarch.rpm
yum install mysql-community-server

Initdata to custom datadir on both servers.

[root@lab2 ~]# mkdir -p /data/{mysql1,mysql1_log,mysqlmulti_log}
[root@lab2 ~]# mysql_install_db –user=mysql –datadir=/data/mysql1
Installing MySQL system tables…2016-06-04 20:39:26 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
2016-06-04 20:39:26 1422 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-04 20:39:26 1422 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-06-04 20:39:26 1422 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-04 20:39:26 1422 [Note] InnoDB: Using Linux native AIO
2016-06-04 20:39:26 1422 [Note] InnoDB: Using CPU crc32 instructions
2016-06-04 20:39:26 1422 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-06-04 20:39:26 1422 [Note] InnoDB: Completed initialization of buffer pool
2016-06-04 20:39:26 1422 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
2016-06-04 20:39:26 1422 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
2016-06-04 20:39:26 1422 [Note] InnoDB: Database physically writes the file full: wait…
2016-06-04 20:39:26 1422 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
2016-06-04 20:39:26 1422 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
2016-06-04 20:39:26 1422 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0
2016-06-04 20:39:26 1422 [Warning] InnoDB: New log files created, LSN=45781
2016-06-04 20:39:26 1422 [Note] InnoDB: Doublewrite buffer not found: creating new
2016-06-04 20:39:26 1422 [Note] InnoDB: Doublewrite buffer created
2016-06-04 20:39:26 1422 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-04 20:39:26 1422 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-06-04 20:39:26 1422 [Note] InnoDB: Foreign key constraint system tables created
2016-06-04 20:39:26 1422 [Note] InnoDB: Creating tablespace and datafile system tables.
2016-06-04 20:39:26 1422 [Note] InnoDB: Tablespace and datafile system tables created.
2016-06-04 20:39:26 1422 [Note] InnoDB: Waiting for purge to start
2016-06-04 20:39:26 1422 [Note] InnoDB: 5.6.14 started; log sequence number 0
2016-06-04 20:39:26 1422 [Note] Binlog end
2016-06-04 20:39:26 1422 [Note] InnoDB: FTS optimize thread exiting.
2016-06-04 20:39:26 1422 [Note] InnoDB: Starting shutdown…
2016-06-04 20:39:28 1422 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables…2016-06-04 20:39:28 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use –explicit_defaults_for_timestamp server option (see documentation for more details).
2016-06-04 20:39:28 1445 [Note] InnoDB: The InnoDB memory heap is disabled
2016-06-04 20:39:28 1445 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-06-04 20:39:28 1445 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-06-04 20:39:28 1445 [Note] InnoDB: Using Linux native AIO
2016-06-04 20:39:28 1445 [Note] InnoDB: Using CPU crc32 instructions
2016-06-04 20:39:28 1445 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-06-04 20:39:28 1445 [Note] InnoDB: Completed initialization of buffer pool
2016-06-04 20:39:28 1445 [Note] InnoDB: Highest supported file format is Barracuda.
2016-06-04 20:39:28 1445 [Note] InnoDB: 128 rollback segment(s) are active.
2016-06-04 20:39:28 1445 [Note] InnoDB: Waiting for purge to start
2016-06-04 20:39:28 1445 [Note] InnoDB: 5.6.14 started; log sequence number 1625977
2016-06-04 20:39:28 1445 [Note] Binlog end
2016-06-04 20:39:28 1445 [Note] InnoDB: FTS optimize thread exiting.
2016-06-04 20:39:28 1445 [Note] InnoDB: Starting shutdown…
2016-06-04 20:39:30 1445 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h lab2 password ‘new-password’
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl
The latest information about MySQL is available on the web at
http://www.mysql.com
Please visit
http://bugs.mysql.com/
to report bugs. This database is public and can be browsed
and searched by anyone. If you log in to the system
you can enter new reports.
New default config file was created as /usr/my.cnf and
will be used by default by the server when you start it.
You may edit this file to change server settings
WARNING: Default config file /etc/my.cnf exists on the system
This file will be read by default by the MySQL server
If you do not want to use this, either remove it, or use the
–defaults-file argument to mysqld_safe when starting the server

 

chown -R mysql. /data/

 

Custom configuration
cat /etc/my.cnf
#MYSQL configuration
[mysql]
prompt=mysql:\\u@\\h:\\p/\\d>\\_
[client]
port            = 3306
socket          = /data/mysql1/mysql1.sock
[mysqld_multi]
mysqld=/usr/bin/mysqld_safe
mysqladmin=/usr/bin/mysqladmin
log=/data/mysqlmulti_log/mysqlmulti.log
[mysqld1]
user=mysql
port            = 3306
bind-address    = 172.16.74.129
server-id=1
log-bin=mysql-bin
datadir=/data/mysql1
socket=/data/mysql1/mysql1.sock
pid-file=/data/mysql1/mysql1.pid
log-error=/data/mysql1_log/mysql1-err.log
long_query_time=10
slow_query_log=1
slow_query_log_file=/data/mysql1_log/mysql1-slow.log
general-log = 0
general_log_file = /data/mysql1_log/mysql1.log
character-set-server = utf8
collation-server = utf8_unicode_ci
max_heap_table_size = 768M
tmp_table_size = 768M
open_files_limit = 20480
#table_open_cache  = 10240
#table_definition_cache = 4096
low_priority_updates = 0
concurrent_insert = 2
connect_timeout = 5
interactive_timeout = 600
wait_timeout = 3600
max_allowed_packet = 256M
myisam_sort_buffer_size = 256M
key_buffer_size = 512M
read_buffer_size = 4M
read_rnd_buffer_size = 8M
sort_buffer_size = 16M
join_buffer_size = 32M
max_connections = 600
max_user_connections = 500
max_connect_errors = 999999
thread_cache_size = 128
thread_concurrency = 4
query_cache_size = 128M
query_cache_limit = 32M
query_cache_type = 1
query_cache_min_res_unit = 512
query_prealloc_size = 262144
query_alloc_block_size = 65536
skip_external_locking
skip-name-resolve
bulk_insert_buffer_size = 64M
sync_frm = 1

 
Start Server

mysqld_multi start 1

Verify it’s running.

mysqld_multi report
Reporting MySQL servers
MySQL server from group: mysqld1 is running

##Replication setup

lab2:
mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.14-log MySQL Community Server (GPL)
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

GRANT REPLICATION SLAVE ON *.* to ‘repl’@’172.16.74.130’ IDENTIFIED BY ‘sl@vE300516’;
FLUSH TABLES WITH READ LOCK;
Query OK, 0 rows affected (0,00 sec)
mysql:root@localhost:mysql1.sock/(none)>  SHOW MASTER STATUS;
+——————+———-+————–+——————+——————-+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+——————+———-+————–+——————+——————-+
| mysql-bin.000001 |      532 |              |                  |                   |
+——————+———-+————–+——————+————cre——-+
1 row in set (0,00 sec)
Remeber this value
lab3:
CHANGE MASTER TO MASTER_HOST=’172.16.74.129′, MASTER_USER=’repl’, MASTER_PASSWORD=’sl@vE300516′, MASTER_LOG_FILE=’mysql-bin.000001′, MASTER_LOG_POS=532;
Query OK, 0 rows affected, 2 warnings (0,01 sec)
start slave;
show slave status\G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: lab2
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000001
Read_Master_Log_Pos: 532
Relay_Log_File: mysql1-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql-bin.000001
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 532
Relay_Log_Space: 120
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 0
Master_UUID:
Master_Info_File: /data/mysql1/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0,00 sec)
lab2:
mysql:root@localhost:mysql1.sock/(none)> UNLOCK TABLES;
Query OK, 0 rows affected (0,00 sec)
mysql:root@localhost:mysql1.sock/(none)> show databases;
+——————–+
| Database           |
+——————–+
| information_schema |
| mysql              |
| performance_schema |
+——————–+
3 rows in set (0,00 sec)
 
 
 
 
 
 

No Comments on Install MySQL Master-Slave on Centos
Categories: Cũ hơn

Install Ruby from source on Centos

Xem thông tin hệ điều hành

cat /etc/redhat-release
CentOS release 6.8 (Final)

Cài các gói phụ thuộc cần thiết

yum -y groupinstall “Development Tools”
yum -y install openssl-devel

Tải bản cài đặt từ trang chủ

wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.gz
tar -xvzf ruby-2.3.1.tar.gz
cd ruby-2.3.1
./configure –prefix=/xserver/ruby
make
make install

Check version sau khi cài đặt

/xserver/ruby/bin/ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Update gem

/xserver/ruby/bin/gem update –system
/xserver/ruby/bin/gem update

Check version gem

/xserver/ruby/bin/gem -v
2.6.4

Cài đặt 1 số thư viện cần thiết như redis, redis-copy

/xserver/ruby/bin/gem install redis
/xserver/ruby/bin/gem install redis-copy

Hoàn thành.

No Comments on Install Ruby from source on Centos
Categories: Cũ hơn

MFG/PRO Simple Init script for Tomcat and Progress OpenEdge October 10, 2015

haizz, đã bỏ dỡ qúa lâu, mốc meo hết rồi.

tomcat.init

#!/bin/bash
HOME=/qserver/apache-tomcat-8.0.27/bin
case “$1” in
    start)
# Main startup
echo -n “Starting Apache Tomcat Server: “
$HOME/startup.sh
echo “OK”
;;
    stop)
# Main shutdown
echo -n “Shutdown Apache Tomcat Server: “
$HOME/shutdown.sh
echo “OK”
;;
    reload|restart)
$0 stop
$0 start
;;
    configtest)
$HOME/configtest.sh
;;
*)
echo “Usage: `basename $0` start|stop|restart|reload|configtest”
exit 1
esac
exit 0

oe11.init

#!/bin/bash
DLC=/qserver/oe11/dlc
case “$1” in
    start)
# Main startup
echo -n “Starting Progress Admin Server: “
$DLC/bin/proadsv -start
sleep 1
$DLC/bin/proadsv -query
echo “OK”
;;
    stop)
# Main shutdown
echo -n “Stop Progress Admin Server: “
$DLC/bin/proadsv -stop
echo “OK”
;;
    reload|restart)
$0 stop
$0 start
;;
    status)
$DLC/bin/proadsv -query
;;
*)
echo “Usage: `basename $0` start|stop|restart|reload|status”
exit 1
esac
exit 0
Hope it helps.
No Comments on MFG/PRO Simple Init script for Tomcat and Progress OpenEdge