Page not found – ShopingServer Wiki https://wiki.shopingserver.com Tutorials and Articles About Technology and Gadgets Wed, 02 Sep 2020 02:13:59 +0000 en-US hourly 1 https://wordpress.org/?v=5.5.14 https://wiki.shopingserver.com/wp-content/uploads/2018/07/cropped-favicon-150x150.png Page not found – ShopingServer Wiki https://wiki.shopingserver.com 32 32 Top 10 Australian Universities in 2019 https://wiki.shopingserver.com/top-10-australian-universities-in-2019/ https://wiki.shopingserver.com/top-10-australian-universities-in-2019/#respond Fri, 29 Mar 2019 12:47:43 +0000 http://wiki.shopingserver.com/?p=23084 In 2019, 6 Australian universities are ranked among the top 10 universities in the world and 9 universities in the list of top 300 universities

This paper attempts to rank 10 top Australian universities in order:

1. Australian National University (ANU)

دانشگاه ملی استرالیا

Australian National University has ranked No. 1 in the top 10 Australian universities and has climbed to 20th in 2018 with 2 steps.

The university is located in the capital city of Canberra.

The university is the only university built by the Australian Parliament that hosts around 22,500 students and scholars, as well as six Nobel laureates from amongst their professors to the world.

2. University of Melbourne

The University of Melbourne is located in a city of the same name

The university is ranked 41th in the world’s universities and the second oldest Australian university in 2018 with one step up in 2018.

The history of the founding of the University of Melbourne dates back to 1853.

The four Australian prime ministers graduated from the university and nine of the Nobel laureates were associated with this university.

3. University of Sydney

دانشگاه سیدنی

Ranked 3 among Australian universities and ranked 50th in global statistics.

It is the history of the first and oldest Australian university founded in 1850

This university is very powerful in law, education, medicine, accounting and finance.

4. University of New South Wales (UNSW)

The University of New South Wales has a global 45th rank with 4 steps to climb in 2018

This university is located in Sydney, Australia, and the richest Australian people graduated from this university.

5. University of Queensland

Queensland University has a rank of 47th in the world with 4 steps up from the previous year with Carnegie Mellon University.

The university ranked fifth among the top ten Australian universities

The University of Queensland is located in the state-owned district of Brisbane, the same name.

6. Monash University

دانشگاه موناش

With a dramatic climb of 5 ranks, the university ranked 60th in the world.

The University of Monash is the second prestigious university in the city of Melbourne

The name of this university is from the prominent John Monash warlord general.

About 70070 people enrolled at the university last year, of which 26,200 are non-Australian students and researchers.

7. Australian University of Western Australia (UWA)

Image result for 7. Australian University of Western Australia (UWA)

It is located in the westernmost part of Australia and in Perth, Australia.

According to statistics, in 2018, with an impressive qualitative and scientific growth, with a 7-step climb in the world ranking, it has increased from 102 to 93 in the world, and with this description this year, in addition to being in the top 10 Australian universities in between 100 universities The top of the world has also taken place

Its campus is very exemplary because of the beauty of its area.

 

8. University of Adelaide

دانشگاه آدلاید

The University of Adelaide has ranked 125th in the 109th World and has now registered the third Australian old university on its record.

It has 5 campuses in the southern state of Australia, as well as a university campus in Singapore

9. University of Technology , Sydney (UTS)

دانشگاه تکنولوژی سیدنی

Sydney University of Technology (UTS) has climbed 25 to 193 global rankings in the past year.

This is a member of the Australian Technology Network, a group of five Australian universities with a history of close cooperation with the industry

 

10. University of Wollongong

دانشگاه ولونگنگ

Like other Australian universities, the university has increased its rank in the last two years to 243 countries.

Wollongong University is located in the Wollongong Beach, New South Wales, and currently employs 32,200 students.

 

By 2019, with the growing academic competition between Australian training centers, it is anticipated that in addition to the new changes in the list of top ten Australian universities, global ranking will also see the arrival of other Australian universities among the best universities in the world.

]]>
https://wiki.shopingserver.com/top-10-australian-universities-in-2019/feed/ 0
Ubuntu Linux: Turn On Exec-Shield Buffer Overflow Protection https://wiki.shopingserver.com/ubuntu-linux-turn-exec-shield-buffer-overflow-protection/ https://wiki.shopingserver.com/ubuntu-linux-turn-exec-shield-buffer-overflow-protection/#respond Sat, 06 Jan 2018 10:25:09 +0000 http://wiki.shopingserver.com/?p=18604 I

am trying to set exec-shield protection on Linux as described here but getting the following error on Ubuntu Linux server version 12.04 LTS:

sysctl -w kernel.exec-shield=1

error: “kernel.exec-shield” is an unknown key

How do I fix this problem and make sure exec-shield buffer overflow protection security feature turned on Ubuntu Linux?

 

Linux kernel (or patch to kernel) provides ExecShield feature to protect against buffer overflows such as:

Random placement of the stack

Random placement of memory regions

Prevention of execution in memory that should only hold data

Handling of text buffers with care and more.

Ubuntu kernel has No Execute (NX) or Execute Disable (XD) support. This does exactly the same thing to prevent code execution on a per memory page basis. If you are using Intel processors you should see the following message when system boots:

dmesg | grep –color  [NX|DX]*protection

Sample outputs:

Fig.01: Intel CPU NX protection for buffer overflow enabled on Ubuntu kernel

 

This is the equivalent of the CentOS or SL or RHEL (Red Hat) Exec Shield kernel security feature. If you do not see the message, reboot the server and set XD/NX protection using BIOS setup.

Make sure kernel.randomize_va_space enabled

Type the following command:

sysctl -w kernel.randomize_va_space=1

 

OR, edit the file /etc/sysctl.conf and append/modify as follows:

kernel.randomize_va_space = 1

The randomize_va_space can have any one of the following values:

0 – Do not randomize stack and vdso page.

1 – Turn on protection and randomize stack, vdso page and mmap.

2 – Turn on protection and randomize stack, vdso page and mmap + randomize brk base address.

I highly recommend that you read our faq “Linux Kernel /etc/sysctl.conf Security Hardening Via Sysctl” for more information.

See also

RHEL / CentOS / Fedora LinuxL Disable or Enable ExecShield Buffer Overflows Protection

Ubuntu security features

Man pages: sysctl(8),dmesg(1)

 

 

]]>
https://wiki.shopingserver.com/ubuntu-linux-turn-exec-shield-buffer-overflow-protection/feed/ 0
Unix and Linux: Redirect Error Output To null Command https://wiki.shopingserver.com/unix-linux-redirect-error-output-null-command/ https://wiki.shopingserver.com/unix-linux-redirect-error-output-null-command/#respond Sat, 06 Jan 2018 10:23:51 +0000 http://wiki.shopingserver.com/?p=18602 I

‘m a new Linux system user. How can I redirect command error output /dev/null on a Linux or Unix-like system using Bash shell?

 

Your shell comes with three file descriptors as follows:

stdin – 0 – Standard Input (usually keyboard or file)

stdout – 1 – Standard Output (usually screen)

stderr – 2 – Standard Error (usually screen)

What is a null (/dev/null) file in a Linux or Unix-like systems?

/dev/null is nothing but a special file that discards all data written to it. The length of the null device is always zero. In this example, first, send output of date command to the screen and later to the /dev/null i.e. discards date command output:

Show on screen ###

date

 

Discards date command output ###

date > /dev/null

Syntax: Standard Error (stderr -2 no) to a file or /dev/null

The syntax is as follows:

command 2>/dev/null

command arg1 arg2 2>/dev/null

date bar 2>/dev/null

ls -foo 2>/dev/null

In this example, send output of find command to /dev/null:

$ find /etc -type f -name  *  2>/dev/null

 

The following example will cause the stderr ouput of a program to be written to a file called errors.txt:

$ find /etc/ -type f -name  *  2> errors.txt

Linux and Unix redirect all output and error to file

The syntax is:

send command output to output.txt and error message to error.txt ##

command > output.txt 2> error.txt

command  -arg1 -arg2 > output.txt 2> error.txt

If you want both stderr and stdout in same file, try:

command > log.txt 2>&1

Use cat command to display log.txt on screen:

cat log.txt

See man pages for more information – bash(1),ksh(1).

 

 

]]>
https://wiki.shopingserver.com/unix-linux-redirect-error-output-null-command/feed/ 0
sed Tip: Delete All Blank White Spaces https://wiki.shopingserver.com/sed-tip-delete-blank-white-spaces/ https://wiki.shopingserver.com/sed-tip-delete-blank-white-spaces/#respond Sat, 06 Jan 2018 10:22:36 +0000 http://wiki.shopingserver.com/?p=18600 I have a text file as follows:

foo

bar

foobar

How can I delete all leading and/or trailing blank spaces, tab from each line using sed command?

 

You can use sed command to delete all white (blank) spaces in a text file. You can also use other text processing utilities such as:

Perl.

Python.

Awk and friends.

Perl example

The syntax is:

perl -lape  s/\s+//sg  input > output

Sample outputs:

foo

bar

foobar

Or use -pie syntax to update file:

cat input

perl -lapi -e  s/\s+|^\n//sg   input

cat input

See perl(1) for more information.

Sed example

The syntax is:

sed -e  s/^[ \t]*//  -e  s/[ \t]*$//  input > output

OR updated file in a single go with the -i option:

sed -i -e  s/^[ \t]*//  -e  s/[ \t]*$//  input

See sed(1) for more information.

Awk example

The syntax is

awk  {$1=$1}{ print }  input > output

You can also use gsub() substring matching the regular expression function. See awk(1) for more information.

 

 

]]>
https://wiki.shopingserver.com/sed-tip-delete-blank-white-spaces/feed/ 0
Debian 7 Wheezy: Install Flash Player https://wiki.shopingserver.com/debian-7-wheezy-install-flash-player/ https://wiki.shopingserver.com/debian-7-wheezy-install-flash-player/#respond Sat, 06 Jan 2018 10:21:22 +0000 http://wiki.shopingserver.com/?p=18597 I am a new Debian Linux version 7 user. I found out that Pandora player is not working due to Adobe flash player. How do I install and use flash player on Debian 7 with Firefox browser?

 

Adobe Flash Player is a multimedia plugin used to play video, games, streaming, and interactivity to Web pages. This how-to describes how to install the Adobe Flash Player (also known as the Macromedia Flash Player), on Debian 7 desktop or laptop systems.

Say, hello to flashplugin-nonfree package

This package acts as a wrapper packages and will download the Flash Player from Adobe. It is a Netscape/Mozilla type plugin. Any browser based on Netscape or Mozilla can use the Flash Player such as

Mozilla-Firefox

Iceweasel

Iceape

Galeon

Epiphany

Konqueror if konqueror-nsplugins is installed.

Installation

Open a terminal and edit the file /etc/apt/sources.list using a text editor and make sure following line exists:

deb ftp://ftp.debian.org/debian stable main contrib non-free

 

Save and close the file. Type the following command:

$ sudo apt-get update

 

Next, type the following apt-get command to install flash player plugin:

$ sudo apt-get install flashplugin-nonfree

 

OR

# apt-get install flashplugin-nonfree

 

Sample outputs:

Reading package lists… Done

Building dependency tree

Reading state information… Done

Suggested packages:

konqueror-nsplugins ttf-xfree86-nonfree hal

The following NEW packages will be installed:

flashplugin-nonfree

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 20.1 kB of archives.

After this operation, 181 kB of additional disk space will be used.

Get:1 http://mirrors.kernel.org/debian/ wheezy/contrib flashplugin-nonfree amd64 1:3.2 [20.1 kB]

Fetched 20.1 kB in 2s (8982 B/s)

Can t set locale; make sure $LC_* and $LANG are correct!

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LANGUAGE =  en_IN:en ,

LC_ALL = (unset),

LC_CTYPE =  UTF-8 ,

LANG =  en_IN

are supported and installed on your system.

perl: warning: Falling back to the standard locale ( C ).

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Selecting previously unselected package flashplugin-nonfree.

(Reading database … 193647 files and directories currently installed.)

Unpacking flashplugin-nonfree (from …/flashplugin-nonfree_1%3a3.2_amd64.deb) …

Processing triggers for man-db …

locale: Cannot set LC_CTYPE to default locale: No such file or directory

locale: Cannot set LC_ALL to default locale: No such file or directory

Processing triggers for hicolor-icon-theme …

Processing triggers for desktop-file-utils …

The Processing triggers for gnome-menus …

Setting up flashplugin-nonfree (1:3.2) …

–2013-06-05 15:55:53–  http://fpdownload.macromedia.com/get/flashplayer/pdc/11.2.202.285/install_flash_player_11_linux.x86_64.tar.gz

Resolving fpdownload.macromedia.com (fpdownload.macromedia.com)… 173.222.18.70

Connecting to fpdownload.macromedia.com (fpdownload.macromedia.com)|173.222.18.70|:80… connected.

HTTP request sent, awaiting response… 200 OK

Length: 7234643 (6.9M) [application/x-gzip]

Saving to: `/tmp/flashplugin-nonfree.i7GZyK1Oxl/install_flash_player_11_linux.x86_64.tar.gz

 

0K ………. ………. ………. ………. ……….  0%  529K 13s

50K ………. ………. ………. ………. ……….  1%  527K 13s

100K ………. ………. ………. ………. ……….  2%  544K 13s

150K ………. ………. ………. ………. ……….  2%  517K 13s

200K ………. ………. ………. ………. ……….  3%  523K 13s

250K ………. ………. ………. ………. ……….  4%  547K 13s

300K ………. ………. ………. ………. ……….  4%  521K 13s

350K ………. ………. ………. ………. ……….  5%  131K 17s

400K ………. ………. ………. ………. ……….  6%  857K 16s

450K ………. ………. ………. ………. ……….  7% 7.09M 15s

500K ………. ………. ………. ………. ……….  7% 7.93M 13s

550K ………. ………. ………. ………. ……….  8% 1.91M 12s

600K ………. ………. ………. ………. ……….  9%  510K 12s

650K ………. ………. ………. ………. ……….  9%  554K 12s

700K ………. ………. ………. ………. ………. 10%  523K 12s

750K ………. ………. ………. ………. ………. 11%  524K 12s

800K ………. ………. ………. ………. ………. 12%  538K 12s

850K ………. ………. ………. ………. ………. 12%  524K 12s

900K ………. ………. ………. ………. ………. 13%  540K 12s

950K ………. ………. ………. ………. ………. 14%  524K 11s

1000K ………. ………. ………. ………. ………. 14%  538K 11s

1050K ………. ………. ………. ………. ………. 15%  524K 11s

1100K ………. ………. ………. ………. ………. 16%  539K 11s

1150K ………. ………. ………. ………. ………. 16%  507K 11s

1200K ………. ………. ………. ………. ………. 17%  542K 11s

1250K ………. ………. ………. ………. ………. 18%  538K 11s

1300K ………. ………. ………. ………. ………. 19%  525K 11s

1350K ………. ………. ………. ………. ………. 19%  538K 11s

1400K ………. ………. ………. ………. ………. 20%  525K 11s

1450K ………. ………. ………. ………. ………. 21%  538K 11s

1500K ………. ………. ………. ………. ………. 21%  523K 10s

1550K ………. ………. ………. ………. ………. 22%  540K 10s

1600K ………. ………. ………. ………. ………. 23%  523K 10s

1650K ………. ………. ………. ………. ………. 24%  512K 10s

1700K ………. ………. ………. ………. ………. 24%  552K 10s

1750K ………. ………. ………. ………. ………. 25%  526K 10s

1800K ………. ………. ………. ………. ………. 26%  538K 10s

1850K ………. ………. ………. ………. ………. 26%  525K 10s

1900K ………. ………. ………. ………. ………. 27%  539K 10s

1950K ………. ………. ………. ………. ………. 28%  524K 10s

2000K ………. ………. ………. ………. ………. 29%  539K 9s

2050K ………. ………. ………. ………. ………. 29%  522K 9s

2100K ………. ………. ………. ………. ………. 30%  525K 9s

2150K ………. ………. ………. ………. ………. 31%  526K 9s

2200K ………. ………. ………. ………. ………. 31%  538K 9s

2250K ………. ………. ………. ………. ………. 32%  509K 9s

2300K ………. ………. ………. ………. ………. 33%  556K 9s

2350K ………. ………. ………. ………. ………. 33%  537K 9s

2400K ………. ………. ………. ………. ………. 34%  525K 9s

2450K ………. ………. ………. ………. ………. 35%  539K 9s

2500K ………. ………. ………. ………. ………. 36%  521K 9s

2550K ………. ………. ………. ………. ………. 36%  526K 8s

2600K ………. ………. ………. ………. ………. 37%  540K 8s

2650K ………. ………. ………. ………. ………. 38%  522K 8s

2700K ………. ………. ………. ………. ………. 38%  536K 8s

2750K ………. ………. ………. ………. ………. 39%  527K 8s

2800K ………. ………. ………. ………. ………. 40%  539K 8s

2850K ………. ………. ………. ………. ………. 41%  524K 8s

2900K ………. ………. ………. ………. ………. 41%  538K 8s

2950K ………. ………. ………. ………. ………. 42%  525K 8s

3000K ………. ………. ………. ………. ………. 43%  523K 8s

3050K ………. ………. ………. ………. ………. 43%  539K 7s

3100K ………. ………. ………. ………. ………. 44%  519K 7s

3150K ………. ………. ………. ………. ………. 45%  173K 8s

3200K ………. ………. ………. ………. ………. 46% 1.39M 7s

3250K ………. ………. ………. ………. ………. 46% 1.08M 7s

3300K ………. ………. ………. ………. ………. 47% 6.68M 7s

3350K ………. ………. ………. ………. ………. 48%  541K 7s

3400K ………. ………. ………. ………. ………. 48%  523K 7s

3450K ………. ………. ………. ………. ………. 49%  523K 7s

3500K ………. ………. ………. ………. ………. 50%  541K 7s

3550K ………. ………. ………. ………. ………. 50%  524K 7s

3600K ………. ………. ………. ………. ………. 51%  521K 6s

3650K ………. ………. ………. ………. ………. 52%  257K 6s

3700K ………. ………. ………. ………. ………. 53% 1.33M 6s

3750K ………. ………. ………. ………. ………. 53% 1018K 6s

3800K ………. ………. ………. ………. ………. 54%  539K 6s

3850K ………. ………. ………. ………. ………. 55%  524K 6s

3900K ………. ………. ………. ………. ………. 55%  315K 6s

3950K ………. ………. ………. ………. ………. 56% 1.67M 6s

4000K ………. ………. ………. ………. ………. 57%  523K 6s

4050K ………. ………. ………. ………. ………. 58%  423K 6s

4100K ………. ………. ………. ………. ………. 58%  532K 6s

4150K ………. ………. ………. ………. ………. 59%  458K 5s

4200K ………. ………. ………. ………. ………. 60%  505K 5s

4250K ………. ………. ………. ………. ………. 60%  444K 5s

4300K ………. ………. ………. ………. ………. 61%  472K 5s

4350K ………. ………. ………. ………. ………. 62%  412K 5s

4400K ………. ………. ………. ………. ………. 62%  490K 5s

4450K ………. ………. ………. ………. ………. 63%  508K 5s

4500K ………. ………. ………. ………. ………. 64%  539K 5s

4550K ………. ………. ………. ………. ………. 65%  411K 5s

4600K ………. ………. ………. ………. ………. 65%  548K 5s

4650K ………. ………. ………. ………. ………. 66%  451K 5s

4700K ………. ………. ………. ………. ………. 67%  512K 4s

4750K ………. ………. ………. ………. ………. 67%  478K 4s

4800K ………. ………. ………. ………. ………. 68%  401K 4s

4850K ………. ………. ………. ………. ………. 69%  418K 4s

4900K ………. ………. ………. ………. ………. 70%  470K 4s

4950K ………. ………. ………. ………. ………. 70%  530K 4s

5000K ………. ………. ………. ………. ………. 71%  524K 4s

5050K ………. ………. ………. ………. ………. 72%  539K 4s

5100K ………. ………. ………. ………. ………. 72%  493K 4s

5150K ………. ………. ………. ………. ………. 73%  441K 4s

5200K ………. ………. ………. ………. ………. 74%  486K 4s

5250K ………. ………. ………. ………. ………. 75%  516K 3s

5300K ………. ………. ………. ………. ………. 75%  440K 3s

5350K ………. ………. ………. ………. ………. 76%  396K 3s

5400K ………. ………. ………. ………. ………. 77%  402K 3s

5450K ………. ………. ………. ………. ………. 77%  497K 3s

5500K ………. ………. ………. ………. ………. 78%  541K 3s

5550K ………. ………. ………. ………. ………. 79%  523K 3s

5600K ………. ………. ………. ………. ………. 79%  533K 3s

5650K ………. ………. ………. ………. ………. 80%  466K 3s

5700K ………. ………. ………. ………. ………. 81%  435K 3s

5750K ………. ………. ………. ………. ………. 82%  476K 2s

5800K ………. ………. ………. ………. ………. 82%  507K 2s

5850K ………. ………. ………. ………. ………. 83%  421K 2s

5900K ………. ………. ………. ………. ………. 84%  484K 2s

5950K ………. ………. ………. ………. ………. 84%  418K 2s

6000K ………. ………. ………. ………. ………. 85%  446K 2s

6050K ………. ………. ………. ………. ………. 86%  529K 2s

6100K ………. ………. ………. ………. ………. 87%  523K 2s

6150K ………. ………. ………. ………. ………. 87%  523K 2s

6200K ………. ………. ………. ………. ………. 88%  437K 2s

6250K ………. ………. ………. ………. ………. 89%  502K 2s

6300K ………. ………. ………. ………. ………. 89%  454K 1s

6350K ………. ………. ………. ………. ………. 90%  514K 1s

6400K ………. ………. ………. ………. ………. 91%  403K 1s

6450K ………. ………. ………. ………. ………. 92%  565K 1s

6500K ………. ………. ………. ………. ………. 92%  400K 1s

6550K ………. ………. ………. ………. ………. 93%  463K 1s

6600K ………. ………. ………. ………. ………. 94%  514K 1s

6650K ………. ………. ………. ………. ………. 94%  540K 1s

6700K ………. ………. ………. ………. ………. 95%  402K 1s

6750K ………. ………. ………. ………. ………. 96%  633K 1s

6800K ………. ………. ………. ………. ………. 96%  407K 0s

6850K ………. ………. ………. ………. ………. 97%  521K 0s

6900K ………. ………. ………. ………. ………. 98%  514K 0s

6950K ………. ………. ………. ………. ………. 99%  460K 0s

7000K ………. ………. ………. ………. ………. 99%  397K 0s

7050K ………. …..                                      100%  442K=14s

 

2013-06-05 15:56:12 (504 KB/s) – `/tmp/flashplugin-nonfree.i7GZyK1Oxl/install_flash_player_11_linux.x86_64.tar.gz  saved [7234643/7234643]

How do I verify installation?

Close the browser. Open Firefox/Iceweasel and click on the Tools menu > choose Add-ons

Fig.01: Firefox/Iceweasel tools menu

 

Choose Plugins tab. You should see flasy player as follows in the list:

Fig.02: Verification for Flash player on Debian 7

 

Open a webrowser and visit the following youtube video for testing purpose:

And there you have it a working flash player for Firefox/Iceweasel on Debian Linux version 7.

 

 

]]>
https://wiki.shopingserver.com/debian-7-wheezy-install-flash-player/feed/ 0
Mac OS X: Install GCC Compiler with Xcode https://wiki.shopingserver.com/mac-os-x-install-gcc-compiler-xcode/ https://wiki.shopingserver.com/mac-os-x-install-gcc-compiler-xcode/#respond Sat, 06 Jan 2018 10:18:13 +0000 http://wiki.shopingserver.com/?p=18595 I have Mac OS X Mountain Lion. I need to compile a few apps and Perl modules. Then I already installed Xcode from app store but I’m unable to find gcc compiler or make command. How do I install gcc on Mac OS X 10.8.x?

 

Xcode includes command line development tools such as gcc and friends.

Step #1: Install Xcode on a Apple Mac OS X

First, make sure Xcode is installed. If it is not installed on OS X, visit app store and install Xcode.

Fig.01: Make sure Xcode developer tools are install OS X

Step #2: Install gcc/LLVM compiler on OS X

Once installed, open Xcode and visit:

Xcode menu > Preferences > Downloads > choose  Command line tools  > Click  Install  button:

Fig.02: Installing gcc compiler on Mac OS X

 

Xcode will download package and install copies of the core command line tools and system headers into system folders, including the LLVM compiler, linker, and build tools.

Step #3: Verification

Open a terminal app and type the following commands:

$ gcc –version

$ whereis gcc

$ whereis make

 

Sample outputs:

Fig.03: Verify gcc compiler installation on Mountain Lion OS X

Testing sample “Hello world” C program

Create a text file called a.c as follows using a text editor such as vi or cat command:

/* a.c – demo for os x */

#include<stdio.h>

int main(void){

printf( Hello world\n );

return 0;

}

To compile, enter:

$ make a

 

Run it as follows:

$ ./a

 

Sample outputs:

Fig.04: Compiling and running sample “Hello world” C program on Mountain Lion 10.8.4

See also

And, there you have it, the gcc version 4.2.1 installed and working correctly on the latest version of Mac OS X 10.8.4. In Apple’s version of GCC, both cc and gcc are actually symbolic links to the llvm-gcc compiler. Similarly, c++ and g++ are links to llvm-g++. For more information and examples see the following man pages:

$ gcc(1)

$ make(1)

 

This entry is 5 of 13 in the Linux GNU/GCC Compilers Tutorial series. Keep reading the rest of the series:

Ubuntu Linux Install GNU GCC Compiler and Development Environment

Debian Linux Install GNU GCC Compiler and Development Environment

CentOS / RHEL 7: Install GCC (C and C++ Compiler) and Development Tools

Download and Install C, C++ Compiler on Red Hat Enterprise Linux 5 (RHEL)

Mac OS X: Install GCC Compiler with Xcode

Where is My Linux GNU C or GCC Compilers Are Installed?

HowTo: Compile And Run a C/C++ Code In Linux

RHEL / CentOS Linux Install Core Development Tools Automake, Gcc (C/C++), Perl, Python & Debuggers

HowTo Compiling C Program And Creating Executable File Under a Linux / UNIX / *BSD

How To Install ncurses Library on a Linux

Linux Find Out What Compilers Are Installed or Available On The System

Linux Find Out GNU gcc Compiler Version Used To Compile Running Kernel

Howto see output of C program in Linux or UNIX

 

 

]]>
https://wiki.shopingserver.com/mac-os-x-install-gcc-compiler-xcode/feed/ 0
CentOS / RHEL: Check If A Service Is Running Or Not https://wiki.shopingserver.com/centos-rhel-check-service-running-not/ https://wiki.shopingserver.com/centos-rhel-check-service-running-not/#respond Sat, 06 Jan 2018 10:16:47 +0000 http://wiki.shopingserver.com/?p=18593 How do I find out if a service such as MySQL or Apache running on my Centos/RHEL/Fedora Linux server? You need to use service command.

It runs a System V init script in as predictable environment as possible, removing most environment variables and with current working directory set to /. The syntax is as follows:

service SERVER status

OR

/etc/init.d/SERVER status

Examples

Find, out if a service called mysqld (MySQL server) is running on CentOS OR RHEL. Open a terminal or login using ssh, enter:

 

# service mysqld status

 

Sample outputs:

mysqld (pid  7556) is running…

Find out status of all services

The service –status-all command runs all init scripts, in alphabetical order, with the status command:

# service –status-all

 

Sample outputs:

….

…..

irqbalance (pid 2183) is running…

iscsi is stopped

iscsid is stopped

Kdump is operational

i5k_amb-isa-0000

Adapter: ISA adapter

Ch. 0 DIMM 0: +63.0°C  (low  = +127.5°C, high = +127.5°C)

Ch. 0 DIMM 1: +56.5°C  (low  = +127.5°C, high = +127.5°C)

Ch. 1 DIMM 0: +62.0°C  (low  = +127.5°C, high = +127.5°C)

Ch. 1 DIMM 1: +49.0°C  (low  = +127.5°C, high = +127.5°C)

Ch. 2 DIMM 0: +54.0°C  (low  = +127.5°C, high = +127.5°C)

Ch. 3 DIMM 0: +49.0°C  (low  = +127.5°C, high = +127.5°C)

 

coretemp-isa-0000

Adapter: ISA adapter

Core 0:      +37.0°C  (high = +78.0°C, crit = +100.0°C)

Core 1:      +38.0°C  (high = +78.0°C, crit = +100.0°C)

Core 2:      +34.0°C  (high = +78.0°C, crit = +100.0°C)

Core 3:      +38.0°C  (high = +78.0°C, crit = +100.0°C)

 

coretemp-isa-0001

Adapter: ISA adapter

Core 0:      +40.0°C  (high = +78.0°C, crit = +100.0°C)

Core 1:      +40.0°C  (high = +78.0°C, crit = +100.0°C)

Core 2:      +39.0°C  (high = +78.0°C, crit = +100.0°C)

Core 3:      +39.0°C  (high = +78.0°C, crit = +100.0°C)

 

w83627hf-isa-0290

Adapter: ISA adapter

in0:         +4.08 V  (min =  +0.00 V, max =  +4.08 V)

in1:         +4.08 V  (min =  +0.00 V, max =  +4.08 V)

in2:         +4.08 V  (min =  +2.82 V, max =  +3.79 V)   ALARM

in3:         +3.07 V  (min =  +4.08 V, max =  +4.05 V)   ALARM

in4:         +3.12 V  (min =  +4.08 V, max =  +4.08 V)   ALARM

in5:         +3.15 V  (min =  +4.08 V, max =  +4.06 V)   ALARM

in6:         +3.20 V  (min =  +4.08 V, max =  +4.06 V)   ALARM

in7:         +3.28 V  (min =  +3.82 V, max =  +4.06 V)   ALARM

in8:         +3.28 V  (min =  +4.06 V, max =  +4.06 V)   ALARM

fan1:          0 RPM  (min =    0 RPM, div = 2)

fan2:          0 RPM  (min =    0 RPM, div = 2)

fan3:          0 RPM  (min =    0 RPM, div = 2)

temp1:       -48.0°C  (high = +60.0°C, hyst = +55.0°C)  sensor = thermistor

temp2:       -48.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor

temp3:       -48.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor

cpu0_vid:   +1.419 V

beep_enable:enabled

 

lvmetad is stopped

mdmonitor is stopped

memcached (pid  45560) is running…

messagebus (pid  7066) is running…

mysqld (pid  7556) is running…

netconsole module not loaded

Configured devices:

lo eth0 eth1

Currently active devices:

lo eth0 eth1

rpc.svcgssd is stopped

rpc.mountd (pid 7199) is running…

nfsd (pid 7262 7261 7260 7259 7258 7257 7256 7255) is running…

rpc.rquotad (pid 7195) is running…

rpc.statd (pid  2215) is running…

ntpd (pid  7295) is running…

master (pid  7649) is running…

Process accounting is enabled.

ipmi_msghandler module not loaded.

ipmi_si module not loaded.

ipmi_devintf module not loaded.

/dev/ipmi0 does not exist.

quota_nld is stopped

rdisc is stopped

…..

..

ps or pgrep command

You can use ps or pgrep command as follows to find out if service is running or not on RHEL/Centos:

# ps aux | grep  serviceNameHere

# ps aux | grep  mysqld

 

OR

# pgrep serviceNameHere

match user name ##

# pgrep -u userName serviceNameHere

# pgrep mysqld

# pgrep -u mysql mysqld

Starting service

Say if a service called httpd is not running on server and you wish to start the same:

# service httpd status

if httpd is not running start it ##

# chkconfig httpd on

# service httpd start

References

For more information see man pages – service(8),pgrep(1),ps(1).

 

 

]]>
https://wiki.shopingserver.com/centos-rhel-check-service-running-not/feed/ 0
Mac OS X: Wake Up Servers Using Wake-on-LAN ( WOL ) Command Utility https://wiki.shopingserver.com/mac-os-x-wake-servers-using-wake-lan-wol-command-utility/ https://wiki.shopingserver.com/mac-os-x-wake-servers-using-wake-lan-wol-command-utility/#respond Sat, 06 Jan 2018 10:15:08 +0000 http://wiki.shopingserver.com/?p=18591 I know how to send WOL command using Linux or FreeBSD wake command. But, how do I send Wake on LAN (WOL) frames to hosts on a local Ethernet network using Apple OS X Unix operating systems to wake up my servers or nas devices?

 

You need to use the wakeonlan Perl script that generates and transmits a Wake-On-LAN (WOL) “Magic Packet”, used for restarting machines that have been soft powered-down (ACPI D3-warm state).

Method #1: Install wakeonlan using Homebrew

Open the Terminal app and type the following command:

brew install wakeonlan

Sample outputs:

Fig.01: OS X brew install wakeonlan client

Method #2: Download and install wakeonlan Perl script

Open a terminal and type the following curl command:

$ mkdir -p $HOME/bin

$ curl https://raw.githubusercontent.com/jpoliv/wakeonlan/master/wakeonlan -o ~/bin/wakeonlan

$ chmod +x ~/bin/wakeonlan

How do I send WOL on a OS X?

The syntax is:

$ ~/bin/wakeonlan server-mac-address-here

 

For example, if nas01 server has 00:08:9b:c4:30:30 mac address, enter:

$ ~/bin/wakeonlan 00:08:9b:c4:30:30

 

Sample outputs:

Sending magic packet to 255.255.255.255:9 with 00:08:9b:c4:30:30

Other options

-i ip_address

set the destination IP address

default: 255.255.255.255 (the limited broadcast address)

-p port

set the destination port

default: 9 (the discard port)

-f file

uses file as a source of hardware addresses

Apple computer wake for network access (WOL) setting

If you want other users to be able to access your Apple OS X based computer’s shared resources, such as shared printers/files/folders or iTunes playlists, even when your computer is in sleep mode. Open System Preferences > choose “Energy Saver preferences“. This set options that control your computer’s energy use including WOL for all Mac Based server and client systems:

Fig.01: OS X setting WOL

Make sure you select the option “Wake for network access” so that other users can wake up your computer using WOL magic packet.

References

wakeonlan(1) for more information.

Download Wakeonlan: Perl script for waking up computers via Wake-On-LAN magic packets

HowTo: Wake Up Computers Using Linux Command [ Wake-on-LAN ( WOL ) ]

 

 

]]>
https://wiki.shopingserver.com/mac-os-x-wake-servers-using-wake-lan-wol-command-utility/feed/ 0
Linux: Find Out Directory Size Command https://wiki.shopingserver.com/linux-find-directory-size-command/ https://wiki.shopingserver.com/linux-find-directory-size-command/#respond Sat, 06 Jan 2018 10:13:47 +0000 http://wiki.shopingserver.com/?p=18589 I am a new Linux user. How do I find out size of a directory on Linux operating systems using command line options?

 

You need to use the du command:

[a] Find and estimate file space usage.

[b] Summarize disk usage of each FILE/Directory/Folder.

[c] Shows the sizes of directories and files.

Syntax

The basic syntax is:

du

du dirName

du [options] dirName

Examples

Without any options, du command shows the names and used space for each directories including all sub-directories in the current directory:

du

 

Sample outputs:

Fig.01: du command in action

To find information about /etc and /home/nixcraft directory, enter:

du /path/to/dir

du /etc

du /home/nixcraft

du /root /home/nixcraft

Pass the -h option to get output in human readable format i.e. show output in kilobytes (K), megabytes (M) and gigabytes (G):

du -h /etc

du -h /dir1/file2

du -h /root

du -h

 

Sample outputs:

8.0K ./.vim

24K ./scripts

48K ./.ssh

16K ./.keychain

2.2M ./.lftp

2.4M .

Pass the -s option to see the total disk space used by a directory:

du -sh

du -sh /etc/

du -sh /etc /home/ /securebackup/

 

Sample outputs:

4.1M /etc

152K /home/

902M /securebackup/

Pass the -c to see a grand total for all of the files, type:

du -csh /root/ /etc/ /home/

 

Sample outputs:

2.4M /root/

4.1M /etc/

152K /home/

6.6M total

See also

UNIX disk usage command examples – include command line tool such as du, df, ncdu, and GUI tools.

See du(1) and examples.

 

 

]]>
https://wiki.shopingserver.com/linux-find-directory-size-command/feed/ 0
Linux: Find Out How Much Disk Space Left On Hard Drive https://wiki.shopingserver.com/linux-find-much-disk-space-left-hard-drive/ https://wiki.shopingserver.com/linux-find-much-disk-space-left-hard-drive/#respond Sat, 06 Jan 2018 10:12:32 +0000 http://wiki.shopingserver.com/?p=18587 I am a desktop support professional with experience working in a corporate call center environment. Recently, I started to admin RHEL based IBM Linux server. How do I determine how much disk space left in my Linux server?

How do I find out how much disk space I have in Linux for each partition?

 

You need to use the df command. It shows the amount of disk space available on the currently mounted file system. df is used to show or find out following information:

Used and available space.

File system mount points.

File system capacity.

The number of inodes available.

Find of whether there is sufficient space to upgrade or install new apps.

Syntax

The basic syntax is as follows:

df

df /path/to/dev

df [options]

df [options] /path/to/dev

Examples

Type the following command:

# df

# df -H

 

Sample outputs:

Fig.01: df command in action

The following example will provide information only for the partition/device that contains the /home directory:

# df /home

# df -h /home

 

To see inode usage instead of block usage, type:

# df -i

# df -i /

# df -ih /

# df -i /dev/md0

 

Sample outputs:

Filesystem            Inodes   IUsed   IFree IUse% Mounted on

/dev/md0             7872512   35813 7836699    1% /

Pass the -T to find out file system type:

# df -T -h

 

Sample outputs:

Filesystem    Type    Size  Used Avail Use% Mounted on

/dev/md0      ext4    119G  1.8G  111G   2% /

tmpfs        tmpfs   1002M     0 1002M   0% /lib/init/rw

udev         tmpfs   1000M  260K 1000M   1% /dev

tmpfs        tmpfs   1002M     0 1002M   0% /dev/shm

/dev/md2      ext4    1.5T  658G  745G  47% /data

/dev/mapper/cryptvg-mybackup

ext3    591G   78G  484G  14% /securebackup

DF COMMAND OPTIONS

From the df(1):

-a, –all             include dummy file systems

-B, –block-size=SIZE  use SIZE-byte blocks

–total           produce a grand total

-h, –human-readable  print sizes in human readable format (e.g., 1K 234M 2G)

-H, –si              likewise, but use powers of 1000 not 1024

-i, –inodes          list inode information instead of block usage

-k                    like –block-size=1K

-l, –local           limit listing to local file systems

–no-sync         do not invoke sync before getting usage info (default)

-P, –portability     use the POSIX output format

–sync            invoke sync before getting usage info

-t, –type=TYPE       limit listing to file systems of type TYPE

-T, –print-type      print file system type

-x, –exclude-type=TYPE   limit listing to file systems not of type TYPE

 

 

]]>
https://wiki.shopingserver.com/linux-find-much-disk-space-left-hard-drive/feed/ 0