Make life simpler I'm developer

Finest Dating Sites In 2022: Patio Eating Season Is Coming

Given the existence of Grindr and Scruff, the need for an internet relationship arena specifically for queer girls was clear — thus, HER. Founders of the award-winning app are committed to cultivating an area that’s “so ragingly queer” that frustrated go to the website ladies can delete apps that don’t really feel like home. What was as soon as a doozy of a sign-up course of is now short, sweet, and free of the corny, religious questions that held it again from being a best choice for the youthful crowd. The comprehensive questionnaire now covers 32 dimensions of what makes a happy relationship. Instead of blatantly asking if you get mad easily or should you’re emotionally stable, eharmony might ask the way you deal with apologizing after a struggle or if a certain action would piss you off.

  • The criticism you hear in this forum just isn’t coming from offended individuals who have nothing better to do with their time except take pot pictures at new posters.
  • With detailed questionnaires and profiles, compatibility scores, and icebreaker questions, it’s easy to match with a possible long-term partner and provoke contact.
  • Jenny enjoys to cowl matters like love, relationships, on-line dating, worldwide dating, and more.

It is a wholly-owned subsidiary of the Sparks Network of online matchmaking services, and has been in service since 1997. Launched in 2001, Christian Mingle is the leading online courting service for single women and men of the Christian religion. The website’s objective is to offer a platform where singles can connect with like-minded individuals who are in search of a God-centered relationship.

It takes the utmost care to prevent any scams or malicious activity on their platform, even employing the utilization of 24/7 buyer support. Users who are still skeptical of the website can dip their toes in without spending money since free customers get limited functionality with UkraineBrides4you.com. On the opposite hand, you would use a tried and tested means with a relationship service like ours. It’s quite simple to register on our site and you’ll have every opportunity to seek out your stunning Ukrainian date here. Some individuals still assume courting websites could be harmful and unreliable, but rest assured that we’ll defend you from scammer assaults. If you’re visiting our website looking for Ukrainian singles for online dating, then you’re in all probability nicely aware of the putting beauty of Ukrainian women and their mild, fun-loving nature.

Do not brush it off simply because they are saying they didn’t do something. Several well-liked courting sites make a good match for spouses keen to place one foot outside the “till dying do us part” vow. They embody FriendFinder.com, MarriedCafe.com, eHarmony.com, NoStringsAttached.com, and Dating.com. If they’re actively hiding this from you, go into their settings and scan the “disabled apps” listing. These apps on their phone have installed, but they’re hiding from the home display screen and app list.

If you have an interest in Ukrainian dating, it’s value knowing the best cities to fulfill and date Ukrainian ladies. In this text, we’ll explore some of the high places that supply unbelievable alternatives for relationship Ukrainian girls. Each of those areas supplies a singular mix of tradition, historical past, and charm. BravoDate is certainly one of the greatest relationship sites in Eastern Europe and is particularly in style amongst Slavic ladies. It has a large and lively audience of Ukrainian singles, which makes it a superb web site for courting Ukrainian girl. Dating Ukrainian ladies can be an incredibly rewarding experience.

Explore a quantity of platforms and try out different features to see which ones work best for you. The Inner Circle is an app for ambitious singletons seeking successful professionals that caters to everything from romantic relationships, casual hookups and even plain-old friendship. As well as enjoying limitless messaging, paid customers can benefit from tickets to quite a few events which make for extra interesting dates than pints at the pub.

Just how A Lot Perform On-line Relationship Sites Cost?

Yes, Ukrainebride4you is designed to be accessible on mobile devices. It usually offers a mobile-responsive website or a devoted mobile app for iOS and Android customers. This permits members to conveniently entry the location’s features, browse profiles, and communicate with Ukrainian singles while on the go. The mobile model of Ukrainebride4you presents a user-friendly interface optimized for smaller screens, offering a seamless dating expertise on cell gadgets.

The High twelve Greatest Online Relationship Websites And Programs To Satisfy Finding love:

In today’s digital age, there are numerous platforms and web sites particularly designed for courting Ukrainian ladies. These finest Ukrainian courting websites provide a convenient and efficient method to join with beautiful and genuine Ukrainian girls. It boasts an intuitive interface, personalized search choices, and plenty of communicative, beautiful Ukrainian ladies prepared to attach. In the quest for love, on-line courting websites play a vital role in connecting people throughout the globe. For those wondering, “What is one of the best Ukraine courting site? Each of these platforms plays an important function within the panorama of Ukrainian girls dating, providing distinctive opportunities for romance and cultural discovery.

Muddy Matches

It’s much less pressure than Bumble’s 24-hour time restrict however still eliminates a listing full of individuals that do not care sufficient to reply or plan a meet-up. Of course, meeting online doesn’t guarantee that a pair won’t break up or that everybody with a profile is trying to maneuver at that pace. No one is assuming on-line relationship is the variable that ensures driving off into the sundown. But analysis does counsel that people who are prepared to place effort and honesty into compatibility exams and open-ended profile questions might be more ready to get severe. Mixing the traditional with the distinctive, the Thursday app shuts down for on a regular basis of the week besides its namesake, when it opens for twenty-four hours for users to match and chat. This is thanks to analysis by the founders which discovered courting apps are used most on Thursdays, presumably to save giving up precious weekend nights to strangers.

If you’re in search of love, you don’t always need to pay an arm and a leg to find it. In reality, you may be ready to meet that special someone via a free dating site. You can create a profile, upload some pictures of yourself and browse potential singles – all for free. You also can block particular customers in the event that they make you uncomfortable in the app’s settings. According to Match, those customers are then faraway from the system till their case is reviewed by a Match employee.

0

Jetx Guess Unleash The Fun Of High-speed Sporting

Unlike the standard slots, the participant may cease the sport and take those winnings at any point before the plane crashes. An additional advantage of JetX is their high level of equity. The game makes use of a provably honest system that makes sure that the end result of each spin is determined by a randomly quantity electrical generator.

  • The sport has become more and more well-liked because of its fast-paced motion and beneficiant payout rates.
  • These are among the greatest on-line on line casino sites which have proven themselves.
  • Pertaining to gamers while on the road, JetX Think also offers a safe cellular app for Android os and iOS customers.
  • The dimension of this latter is determined by the size of bets, using numerous techniques and dangers.

The animation starts and players place their particular bets because the jet will take off. If the fly rises meant for a longer period, the multiplier also increases. Yet , at any time, the player can decide to money in with one click on; any time he really does, he ejects from the plane and multiplies his wager by the value of the current multiplier. The aim is to withdraw your share as later as potential while avoiding a crash. Any time you do not take away your wager in time, or if you ‘re caught in the crash, you lose everything you have wagered within this round.

Frequently asked questions: Incessantly Asked Questions And Answers With respect to Gamers

Just for drawback playing go to ncpgambling. org You must be 21+ to make use of this web site. Everyday you can find here the most effective NBA playing tips and predictions for all those tonight’s… Establish the primary guess as “Auto Cashout” by 2 . 00x and use the second one to get the next multiplier – let’s say comparable to the common within the last 8-15 rounds. Confirm your guess by hitting the ‘Place your wager ‘ key and await the subsequent sport spherical to start. Your pay out is the quantity you won multiplied with a multiplier you have wagered upon. Jetx is mostly a sport manufactured by smartsoft where you presumably can easily earn money.

One of the most effective features of JetX is a betting program. Players may place gambling bets on themselves or other players in each spherical of the sport. This means that you’re not only enjoying to get the sport, but additionally to get money. It has a great way to include even more pleasure to an previously thrilling game. For those that like to test things away before fully diving into the gaming process, there’s a demo model. The aim is to return the wager with the utmost multiplier.

An old school option but nonetheless an excellent you for individuals who have great, quick connection with their companies. Players can contact all their financial institution with all the casino’s financial institution wire particulars (casinos present this on the banking section) and arrange a wire switch. Using cable transfer you’re additionally certainly not giving any of your banking details to the casino should this kind of be essential to you. This kind of signifies that for every $/£100 that you simply bet, you possibly can expect to receive a median of $/£97. 30 back.

Jetx Guess Sport Standard Web Site

Whenever you’d like to check out the demo recreation before taking half in for actual money, a variety of online casinos supply cost-free variations of the sport. One particular wonderful possibility is CBet Casino, which usually offers a huge selection of on-line slots and other casino games right from top builders similar to Netentertainment and Microgaming. Simply visit the Cbet Casino web site to register and start playing right now, or you can check out the demo model of Fly X upon our web site. If you want to learn more about JetX before playing for real cash, therefore utilizing the demo model is a superb choice.

What Methods Should I Exploit To Maximise My Chances Of Successful?

It permits you to feel the opportunity to get as a lot as attainable, mixed with the desire to avoid losing. Is there an individual jetx game who can take a glance at a jet aircraft with full calm and a chilly head? Nobody, of course, and that is what makes JetX so powerful. The best free slot machine games are typically the ones with a excessive RTP.

Jackpot

Simply perform your favorite free slot machines directly inside your internet, with out registering your particulars. A tiny game that seems alongside the main sport of the totally free slot machine. A bonus that permits the player to learn from additional spins, with out having to put any wagers themselves. Due to HTML5 software, you can now perform free slot machine games for fun in your mobile phone, pill, or perhaps PC. The sport looks great and work very easily on all three units. Together with AM1 Studios, Microgaming released a Mexican-themed slot with up to 117, 649 ways to earn.

Jet X Real Cash Play

This system guarantees the absence of interference from website owners or perhaps administrators, guaranteeing that you could get peace of mind. It could be additionally potential to withdraw manually while using auto-withdraw. This is why some avid gamers use a excessive to mid multiplier in auto-withdraw mode, similar to 20-30, and withdraw manually if they consider the aircraft is about to crash. You should at all times choose the utmost guess quantity per rotate, as this kind of tremendously increases your chances of success.

Find A Sport With A Excessive Rtp

When you withdraw a giant guess on the cheapest odds, you get spectacular amounts. Which has a small guess, your winnings can turn out to be simply while huge, but you won’t get rid of excess large amounts if you get rid of. Malawian users who want to get to know and play the JetX game wonder where it is less dangerous and extra enjoyable to play. Find out higher concerning the great representatives of online internet casinos where to learn JetX.

JetX Crash Game is actually a very popular game in fashionable on-line casinos, and this sort of on-line gaming collects increasingly more fans each day. You’ve just hit the jackpot and scored big winnings by Casino Jetx. It takes a strategic approach to ensure that you maximize your chances of winning and decrease your dangers. Online casinos are on the rise ~ particularly in these attempting times. Regardless of the place you’re, you will find online casinos and sportsbooks ready to service plan you.

To make a put in, simply login your account on the official web site and select “Deposit” from the main menu. Build up are usually processed instantly however can take up to 24 hours depending on the strategy used. Making deposits for JetX Gambling house is quick, simple and secure. Players can use a wide selection of payment methods to pay in funds to their accounts.

0

Connect with Scorching -mail Order Asian Women Meant for Marriage

The MatchTruly group conducts extensive ID verification of all new feminine participants and ongoing moderation from the profiles. If it comes to contact exchange between members of the site and even indonesian brides real meetings, man members` identities are also inspected and verified by the site`s moderation. Superior high quality with the profiles is definitely something system can features as over 90% of the profile have a profile picture and a minimum of some sort of description to check.

You can use on-line dating providers or come to the nation if you want to look for an Hard anodized cookware wife. To put it briefly, an Asian bride may be a overseas girl thinking about set up a Traditional western guy just like you. And, luckily, Asian courting sites have already demonstrated their effectiveness when it comes to love search. If, for whatever reason, you’re encountering finding a spouse in your home region, strive trying to find an Cookware mail purchase bride. Honestly, that is why various Western men marry ladies of different backrounds, in search of these people on countless relationship systems. It’s not pleasantly surprised as a end result of most pretty Asian young ladies make superb, dependable girlfriends or wives and life companions. Some sources say that the divorce level between Cookware girls plus some European guys is kind of low.

  • I saw that many Eastern Western females was very attractive.
  • He was a 1963 graduate of Butler High School, the place he performed soccer, baseball, and was a Younger Olympic Swimmer.
  • Always try to show your finest sides and become a true gentleman as a outcome of women via any country approve of men being well mannered and courteous.
  • For example , well-liked apps matching to Zoosk and OkCupid have an expansive international network and give you access to a large world community.
  • It’s a possibly potential even so not one of the most dependable choice as a result of Russian ladies rarely reply to strangers on Fb or Instagram.

Elevated in patriarchal families a standard Slavic girl from Belarus appears for a partner who’ll remind her daddy. They fork out consideration for the inner attributes of males, so it isn’t really enough to look nice to win the center of an local Slavic bride. Russian ladies out of urban areas differ a lot out of girls house in non-urban ones. They will wear nicer make-up and they are more self-confident, demanding, and goal-oriented. Females from small towns and villages of Russia and other Slavic nations around the world are pleased with little and don’t check with a lot.

Relation To Household

Seeing consultants indicate their needs make Japanese mail-order brides into the category of in the most appropriate partners for males worldwide. As apart from all their stunning seems, their persona traits put even more appeal to the woman image of the nation. Thailänder weddings is really an attractive mix of ancient traditions and symbolic rituals.

She actually is often of mixed Slavic and non-Slavic descent and it is on the lookout for a husband who’s both prepared and powerful. Patrizia Marodi is a famend courting specialist and psychiatrist who centers on serving to people navigate the complexities of recent relationships. With her exhaustive data and experience, she has helped many people get over obstacles and choose true love and happiness. When you’re attending to know a Slovakian girlfriend, it’s vital that you simply faithfulness her custom and prices. Prove the sincerity in studying extra about her background and life style by asking thoughtful issues or having information in front of time.

Internationalcupidcom – The #1 Global Courting Software Around The World

The Russian postal mail order bride industry continues to grow in most up-to-date times seeing that extra men have turn out to be interested in these girls. There are many companies that specialize in connecting Russian brides withforeign husbands. These firms sometimes source a broad range of companies, including interpreters, journeys, and even titanium wedding bands planning. While the idea of an eastern european mail order bride could appear unusual to some, it is really a fairly common apply. In many ways, it truly is no different than various other type of international marriage.

A standard Asian young lady works very exhausting and often comes with an honest job as properly. This lady can take care of herself and also help her family members in tough cases. But as to why do these girls sign-up on romance sites? Because, just like West females, Asians will be in search of a serious relationship that may lead to matrimony.

The origins lie in the emasculation of Asian American men, a apply in whose historical past schedules again to the 1800s and early 1900s in what is normally referred to presently as the “bachelor modern culture, ” Yuen talked about. That time period marked a few of the first ocean of migrants from Asia to the usa suggests as Chinese employees had been recruited to create the transcontinental railroad.

Online dating Slavic Ladies: The Ways to Meet A Slavic Girlfriend In 2024

But the conversations and my shows with my friends in Plan A Mag revealed may be a serious concern relating to just who Asians opt for as lovers. Like in many Developed weddings, the bride and groom change rings during Japanese weddings. However , not like customs in your country, the jewelry are usually not donned after the service. They are normally offered in elaborate boxes and stored securely as favorite keepsakes.

Very well, then you should discover anyone who knows what understanding is certainly. Somebody so, who doesn’t need words to ascertain out that you’re looking for an emotional back up or that you just want a person to brighten your up. Russian gals can make guys feel comfortable at any event. Having a rough day at work or coming via challenges you are worthy of a associate’s who can take care of you. Russian young ladies are very guru in providing emotional help for their guys. Without understanding, sympathy, and compassion there is no likelihood for you to talk to your life associate successfully. Personal relationships require a lady to be caring, understanding, and useful first of all relating to the emotional level.

0

South-eastern Asian Brides Find An Oriental Wife Web based With Jetbride Com

With all the proliferation of online dating, nevertheless, you can be anywhere on the planet and strike up a dialog when using the girl of your goals. By best way, if you’re wondering why this part is approximately ladies and under no circumstances guys, it is as a end result of Im talking to almost all (sorry, ladies). Chinese culture locations a fine emphasis on the family, so ignoring this might be a large mistake. Costa Rican brides The moment meeting the dad and mom of the Chinese woman, make certain to decorate appropriately and respectfully. Go for formal outfits that displays your understanding of the function and showcases your understanding for his or her tradition. When marrying Chinese birdes-to-be, be prepared for several culture impact!

  • You shall be astonished by the various beautiful girls from Thailand who’re registered on this sort of sites and they are serious about the relationships which has a international associate’s.
  • This discussion is so deep-seated that many westerners are scandalized by any kind of civilization which embrace the best.
  • The subsequent time you will be crammed in to an Uber Pool or perhaps Lyft Brand, be bold and discussion up your guy passengers.
  • Crystal clear group and intuitive alternatives and service providers, make the means of discovering a suitable beautiful girlfriend easy.
  • Always be generous, well mannered and care for the Thai time to construct a path to a challenging and partnership.

In addition, it might be wonderful if that they carry a person new to your small business. We typically get acquainted with our friends’ colleagues, relatives, and their different fellows. Chances are you’ll look for a potential spouse whenever you spend time with them. According to your interests or beginning, you may be part of a bunch of persons united by the same purposes and desires. There are many organization, ethnic, and cultural-based offline conferences, this means you will discover an acceptable surroundings. Show up at community situations, whether it is a spiritual gathering or offer session, and you may have an opportunity to increase the volume of your interpersonal connections. If you are going to turn out to be a profitable internet dater and start with the hottest companions, you’ll certainly need a lot of suggestions.

Actual Ardour

That mentioned, single travel could be challenging, and at occasions will surely get lonely. But if you’re on the lookout for your soulmate, set your Bumble location to Rancho The phillipines, No . 2 in Relationship Potential. Pasadena is best among Ohio cities and placed first of all in Relationship Intervention, although Fremont proved to be the prime site for Marital life Stability (No. 1). The sturdy Catholic presence in Fremont may aid explain its keep tabs on document. This fast-growing city about twelve miles east of Detroit is the No . one particular Best Town to Obtain (and Stay) Married in 2022, placing second total for Marital life Stability.

Chat is the main communication attribute right here, and customers can easily enhance the expertise by swapping photographs and videos, sending stickers, and emojis, and in addition writing long love characters. JollyRomance is among the dating sites that don’t makes use of the usual plan and supply just good old online dating companies. This is certainly one of many websites that try to end up being innovative, offer one thing fresh and enhance the experience with respect to users. Online surveys declare that 8% to 39% of yankee couples connect with on-line via relationship apps or perhaps web sites. So if you’re not comfortable testing your pickup ranges in bars, internet dating services would be the apparent response to “Where can one discover a better half? Below, you’ll discover three tried-and-true options to work.

What Are The choices Of A Perfect Wife?

Many instances, these types of Chinese men and women will email or text message one another ahead of they ultimately meet particularly person. Should you determine to use an Asian dating service, it’s essential to know that not pretty much all services and websites will be equally efficient or safe. If you want to learn Chinese partner, you must know they are some of the most friendly girls in the earth. There is a constructive perspective in course of strangers, kids, and house animals and never leave them with no helping hand in want. If you can’t thoughts the companion becoming helpful to any person they satisfy, think about outset a romantic relationship with a deliver order bride-to-be Chinese.

In the event you give up fifty percent the method, not solely you’ll certainly be disappointed but in addition your Oriental lady. Obtaining Chinese girls is a good idea not merely due to their elegance and traditions but in addition for their loyalty and commitment for their partners. A regular Chinese ladies for matrimony is specializing in her family unit, especially her husband. She will be there for you thru fluffy and thin, offering complete, utter, absolute, wholehearted help during difficult instances. If you are looking for somebody who will stand by the aspect may well not matter, then a Far east mail order wife could possibly be favorable match to suit your needs. Getting a Thai spouse is an excellent idea for many who share classic family values; thus, if you want your Cookware spouse to respect ordinary gender functions, Thai young girls won’t dissatisfy you. Each of the relationship websites we discussed on this document are true, and one amongst them likely will allow you to discover a Chinese better half.

Climb the hilly cobblestone streets of Cuzco to a charming bar and revel in a conventional pisco bad as you consume panoramic perspectives of the town by night time. Book every day head to to close by simply Rainbow Off-road for a breathtaking hike through the gorgeous Peruvian intelligence and bond with fellow solo vacationers making the trek.

Regional hosts should typically also act as your own personal personal tour information and have absolutely you town from other insider point of view. There’s undoubtedly that an suitable location to fall in love with a stranger is usually against the stunning backdrop of Queenstown, New Zealand. Coming from close by organic points of interest, scenic hikes, and exciting night life, you’ll in no way be absent for processes to fulfill new people it does not matter what their pursuits. In the event browsing is your factor, check out Canggu to catch several waves with sun-kissed travellers and locals alike. For the extra laid again vibe, spend your time in Ubud, a yogi’s heaven, where you will without doubt meet like-minded travellers and maybe even separation a nasi goreng or perhaps natural acai berry bowl.

Besides, all these images of intercultural couples on TV associated with idea of getting married to a American man interesting. Asian people don’t think about it a convention when a person stands on his knee and supplies a ring to his woman. The past of kneeling in America schedules again to medieval knights bowing ahead of noblewomen. Depending on the Encyclopedia of Male or female and Modern culture, Asia is normally understood intended for arranged partnerships, so there aren’t any kind of special traditions for proposals. For example , in Vietnam, in which tradition affiliated to a pitch known as Lễ Đám Hỏi’. It means that the nearest relations ‘present’ the version new few to the forefathers, thus tallying with the extended run marital life. Most importantly, it may be the chance designed for Asian brides to be the person who they need and remain happy and respected.

0

Cài đặt MySQL trên CentOS 7.

MySQL là hệ quản trị cơ sở dữ liệu mã nguồn mở và miễn phí, phổ biến nhất thế giới và được các developer ưa chuộng nhất trong quá trình phát triển ứng dụng. Mình đi deploy nhiều quá, nên tiện viết lại bài viết này để gửi cho bên triển khai luôn cho đỡ mất công viết lại docs hướng dẫn lần nữa. Trong bài viết này mình sẽ hướng dẫn step by step bằng các command để các bạn cài đặt MySQL trên CentOS 7,

Trong bài viết này mình sẽ hướng dẫn càu đặt hai phiên bản phổ biến nhất và hay được sử dụng nhất là phiên bản 8.0 và phiên bản 5.7. Chú ý tuỳ từng nhu cầu để chọn phiên bản phù hợp nhất nhé.

1. Cài đặt MySQL

Với MySQL 8.0 trên CentOS 7.

# Thêm repository 
sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

# Cài đặt sau khi thêm repository 
sudo yum install mysql-community-server

Với MySQL 5.7 trên CentOS 7.

# Thêm repository 
sudo yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm

# Cài đặt sau khi thêm repository 
sudo yum install mysql-community-server

2. Khởi động MySQL

# Kích hoạt MySQL khởi động cùng system
sudo systemctl enable mysqld

# Khởi động MySQL
sudo systemctl start mysqld

# Kiểm tra MySQL service đã hoạt động chưa?
sudo systemctl status mysqld

2. Đặt lại MySQL Root Password

Với MySQL 5.7

Khi MySQL khởi chạy lần đầu, một mật khẩu tạm sẽ được sinh ra ngẫu nhiên cho root user của MySQL. Bạn có thể tìm mật khẩu đó bằng câu lệnh bên dưới:

# Tìm mật khẩu tạm được gen ngẫu nhiên lần đầu:
sudo grep 'temporary password' /var/log/mysqld.log

# Ouput lệnh trên sẽ hiện ra password
2021-09-22T17:33:40.984983Z 1 [Note] A temporary password is generated for root@localhost: odG*hI-hn9Rx

Giờ chúng ta cần đi thay đổi mật khẩu này bằng một mật khẩu dễ nhớ hơn, bằng cách chạy lệnh mysql_secure_installation để cải thiện tính bảo mật của MySQL

sudo mysql_secure_installation 

Nhập mật khẩu tạm thời của bạn. Sau đó làm theo hướng dẫn:

Enter password for user root: odG*hI-hn9Rx

New password: Nhập mật khẩu Mysql mới
Re-enter new password: Nhập lại mật khẩu Mysql mới

Change the password for root? y
Remove anonymous users? y
Disallow root login remotely? y
Remove test database and access to it? y
Reload privilege tables now? y

Với MySQL 8.0

# Dừng service MySQL trước tiên
sudo systemctl stop mysqld

# Restart lại MySQL trong safe mode, để bỏ qua mật khẩu.
sudo mysqld_safe --skip-grant-tables

# Sau khi và safe mode sẽ đơ một chút và chờ để login với root user.
mysql -uroot

# Để đổi mật khẩu root thành "newpassword", nhập lệnh sau
mysql> USE MYSQL;
mysql> UPDATE USER SET PASSWORD=PASSWORD("newpassword") WHERE USER='root';
mysql> FLUSH PRIVILEGES;
mysql> EXIT

# Khởi động lại MySQL
sudo systemctl start mysqld

2. Tạo một user cho phép remote login.

Mặc định user: root chỉ cho phép đăng nhập qua localhost để đảm bảo tính bảo mật, và không cho phép đăng nhập từ xa, vì vậy để dễ dàng có thể login từ một tools ở client hay để test các database riêng biệt, chúng ta sẽ tạo một user riêng biệt.

Tạo một user mới.

# Đăng nhập MySQL trước tiên (nhập mật khẩu mới của user root)
mysql -u root -p

# Tạo user "username" với truyền truy cập chỉ từ "localhost"
mysql> CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

# Tạo user "test" với quyền any.
mysql> CREATE USER 'test'@'%' IDENTIFIED BY 'password';

# Cấp phép quyền truy cập "username" truy cập tất cả vào một database chỉ định.
mysql> GRANT ALL PRIVILEGES ON database_name.* TO 'username'@'localhost';

# Cấp phép truyền truy cập "username" có thể SELECT bảng "users" trong database chỉ định.
mysql> GRANT ALL PRIVILEGES ON database_name.users TO 'username'@'localhost';

# Cấp phép super user cho user "test"
mysql> GRANT ALL PRIVILEGES ON *.* TO 'test'@'%' WITH GRANT OPTION;

# Lưu thay đổi vào MySQL
mysql> FLUSH PRIVILEGES;

# Thoát khởi MySQL trở về
mysql> exit;

Quản lý User Permisssion Type

Bạn cũng có thể gán từng quyền riêng biệt, bao gồm:

  • SELECT – user có quyền đọc (read) database bằng lệnh select
  • CREATE – họ có thể tạo bảng mới
  • DROP – cho phép người dùng xóa bảng
  • DELETE – users có thể xóa dòng khỏi bảng
  • INSERT – giúp user thêm dòng vào bảng
  • UPDATE – giúp cập nhật dòng
  • GRANT OPTION – có thể gán hoặc xóa quyền của user khác

Các lệnh khác có thể hữu ích.

# Xoá một user
mysql> DROP USER ‘username’@‘localhost’

# Xoá quyền truy cập
mysql> REVOKE permission_type ON database_name.* TO 'username'@'localhost'

# Kiểm tra xem user có quyền gì
mysql> SHOW GRANTS username
0

Triển khai Let’s Encrypt trên Google App Engine.

Mình có đang sử dụng một service clouds của Google là App Engine (GAE), nhưng do yêu cầu bắt buộc của một vài dịch vụ, phải chuyển hệ thống API và domain sang HTTPS.

Vì đã sử dụng Let’s Encrypt cho một vài domain cá nhân nên mình muốn tìm cách triển khai nó trên App Engine.

Triển khai certbot cho App Engine nó khá khác so với deploy lên hẳn một server linux, bởi không thể thao tác và chỉnh sửa được file ssl.config như thông thường, mà thông qua hệ thống của Google Cloud Service.

1. Cài đặt certbot lên máy của bạn. Tôi sử dụng macOS

brew install certbot

2. Tạo pem file cho domain AppEngine đang sử dụng.

Cách 1: Sử dụng HTTP

sudo certbot certonly --manual

Cách 2: Sử dụng cho DNS

sudo certbot certonly --manual --preferred-challenges dns

3. Thêm các thông tin yêu cầu của certbot.

Cách 1:

Console sẽ yêu cầu hỏi bạn để tạo ra một file tại yourdomain.com/.well-known/acme-challenge

Việc bạn cần bây giờ là tạo thư mục tương ứng cho .well-known/acme-challenge cho domain và AppEngine của bạn trên thư mục đang đồng bộ file.

handlers:
- url: /.well-known/acme-challenge
  static_dir: letsencrypt

Cách 2:

Console sẽ yêu cầu bạn nhập email và domain sẽ được matching để tạo pem file. Tiếp tục làm theo hướng dẫn cho đến khi hoàn tất. Với cách sử dụng DNS sẽ yêu cầu bạn tạo một TXT Record trên domain của bạn

type: TXT
host: _acme-challenge (or _acme-challenge.yourdomain)
value: XYZ

Thử kiểm tra các cấu hình trước khi hoàn tất bước cuối cùng, để đảm bảo TXT record đã tồn tại.

$ dig -t txt _acme-challenge.[yourdomain.com]
OR 
$ dig -t txt _acme-challenge.[yoursubdomain.yourdomain.com]

Sau khi hoàn tất, pem file đã được tạo tại /etc/letsencrypt/live/yourdomain.com/fullchain.pem đừng vội truy cập, có thể bạn sẽ không truy cập được nó ngay vì không có permisssion, cần chmod 777 thư mục /etc/letsencrypt/live/ hoặc sử dụng command để copy thông tin của pem file.

4. Lưu thông tin Public key và Private key mới được gen từ certbot.

Vì bạn phải upload “public key”, “private key” cùng nội dung của key để có thể xác thức qua hệ thống của Google.

# Copy public key into keyboard
$ sudo cat /etc/letsencrypt/live/yourdomain.com/fullchain.pem | pbcopy
# Tạo Pem file từ private key
$ sudo openssl rsa -inform pem -in /etc/letsencrypt/live/yourdomain.com/privkey.pem -outform pem > /etc/letsencrypt/live/yourdomain.com/rsaprivatekey.pem

# Copy private key vào keyboard
$ sudo cat /etc/letsencrypt/live/yourdomain.com/rsaprivatekey.pem | pbcopy

5. Chỉnh sửa thông tin tại AppEngine.

Đăng nhập vào Google Cloud Platform

https://console.cloud.google.com/appengine

Truy cập vào: Settings -> SSL certificates -> Upload a new certificate

Tải các file liên quan fullchain.pemrsaprivatekey.pem lên GAE và copy các nội dung của public key cùng private key đã lấy được từ bước trước đó. Sau đó ấn Upload và xác nhận để hoàn tất.

0

Cài đặt SSL/TLS và giao thức HTTPS với Open SSL và Let’s Encrypt

Rất nhiều các dịch vụ chỉ cho phép được kích hoạt khi giao thức kết nối website của bạn phải là HTTPS, vậy làm sao để có thể seting HTTPS trên website của bạn, mình sẽ viết bài viết này để hỗ trợ anh em cài đặt SSL/TLS miễn phí để sử dụng được HTTPS cho website chạy trên Apache httpd, Nginx…

SSL/TLS hay HTTPS là gì vậy?

SSL: là viết tắt của Secure Sockets Layer (Lớp socket bảo mật), nó là một cơ chế bảo mật bằng cách mã hóa thông tin liên lạc giữa clien và server (website và trình duyệt). Công nghệ này đang lỗi thời, và được thay thế hoàn toàn bởi TLS.

TLS: là viết tắt của Transport Layer Security, cũng là một cơ chế bảo mật – bảo mật lớp truyền dẫn (trong khái niệm mạng) – nó cũng giáo bảo mật thông tin giống như SSL, nó ra đời để thay thế cho SSL.

HTTPS: nó là một phần mở rộng của giao thức truyền nội dung text HTTP giữa client và server (giữa trình duyệt và máy chủ web), bản thông tin liên lạc bằng HTTP không được mã hóa, các gói tin có thể đọc được khi truyền dẫn. HTTPS là giao thức dùng cơ chế bảo mật SSL/TLS để mã hóa thông tin.

  • Mục tiêu của SSL/TLS là bảo mật các thông tin nhạy cảm trong quá trình truyền trên internet như, thông tin cá nhân, thông tin thanh toán, thông tin đăng nhập.
  • Nó là giải pháp thay thế cho phướng pháp truyền thông tin văn bản dạng plain text, văn bản loại này khi truyền trên internet sẽ không được mã hóa, nên việc áp dụng mã hóa vào sẽ khiến cho các bên thứ 3 không xâm nhập được bào thông tin của bạn, không đánh cắp hay chỉnh sửa được các thông tin đó.
  • Hầu hết mọi người đều quen thuộc với các chứng chỉ SSL/TLS, đang được dùng bởi các website lớn và các webmaster nghiêm túc trong việc bảo vệ các giao dịch người dùng.
  • Bạn có thể biết được website có đang dùng chứng chỉ bảo mật SSL/TLS hay không đơn giản bằng cách nhìn vào icon trong URL ngay trong thanh địa chỉ.

Thông thường các máy chủ web đều được cấu hình ở port 80 cho giáo thức HTTP và sử dụng port 443 cho giao thức HTTPS.

Cách thức hoạt động của TLS với HTTPS

TLS dùng public key và private key, có một số cách thức sử dụng TLS tạo ra kết nối an toàn, sơ đồ trên (one-way TLS) là một cách thức, nó hoạt động qua các bước:

  • Trình duyệt gửi yêu cầu một phiên làm việc an toàn tới máy chủ
  • Máy trả về một chứng chỉ, chứng chỉ này có chứa public key của server, chứng chỉ này phát sinh bởi server và trên server có chứa private key nữa (private key không được gửi tới trình duyệt).
  • Trình duyệt cần ký nhận chứng chỉ, nó tạo ra yêu cầu tới CA (Certificate Authority) để chứng thực chứng chỉ.
  • Trình duyệt và máy chủ trao đổi một số thông tin để kiểm tra các key
  • Trình duyệt và Server bắt đầu trao đổi dữ liệu được mã hóa TLS

Certificate Authority là nhà cung cấp chứng chỉ số (cung cấp public key/private key cho server) – CA phải đảm bảo được danh tính chính xác cụ thể của đối tượng (server, webiste) được cung cấp chứng chỉ – bằng cách xác nhận thông tin của cá nhân, tổ chức.

Option 1: Sử dụng OpenSSL

OpenSSL là công cụ mã hóa SSL/TLS, sử dụng nó để tạo/quản lý các public key/private key – dùng nó để sinh các chứng chỉ SSL tự xác thực

Trên CentOS có thề cài openssl với lệnh:

yum install mod_ssl openssl

Tạo file cerfiticate tại thư mục /certdungnv

mkdir /certdungnv
cd /certdungnv/
openssl genrsa -out ca.key 2048
openssl req -new -key ca.key -out ca.csr

# Tạo ra CERTIFICATE REQUEST.
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

Sau lệnh này openssl sinh ra file /certdungnv/ca.csr chứa CERTIFICATE REQUEST.

Và đến đây, chứng ta đã thu được các file để sử dụng tại /certdungnv

  • Chứng chỉ (public key): ca.crt
  • Chìa khoá (Private Key): ca.key

Chỉnh sửa cấu hình Apache với Httpd cho cổng 443 như sau

<VirtualHost *:443>
        ServerName dungnv.info
        SSLEngine on
        SSLCertificateFile /certdungnv/ca.crt
        SSLCertificateKeyFile /certdungnv/ca.key
        <Directory /var/www/blogs/dungnv.info/httpsdocs>
            AllowOverride All
        </Directory>
        DocumentRoot /var/www/blogs/dungnv.info/httpsdocs
</VirtualHost>

Lúc này việc xác thực cần phải từ một CA (Certificate Authority), bạn có thể mua chứng chỉ SSL/TLS để có public key/private key và sử dụng như trên, hoặc lấy cert miễn phía từ CA Let’s Encrypt.

Option 2: Sử dụng Let’s Encrypt để lấy SSL miễn phí.

Trước tiên bạn cần cài đặt cerbot, hãy đảm bảo bạn đã kích hoạt EPEL repository bằng cách nhập lệnh này:

yum -y install epel-release

Tiếp theo là cài đặt yum-utils

sudo yum install certbot python2-certbot-apache mod_ssl

Chỉnh sửa email trước khi gửi request lấy Certificate

certbot register --update-registration --email contact@dungnv.info
# or
certbot update_account --email contact@dungnv.info

Sau khi cài đặt certbot, hãy chạy nó bằng cách thực thi:

# Để chạy lấy certficate với các option đầy đủ
sudo certbot

sudo certbot --apache

sudo certbot --apache -d example.com -d www.example.com

# Tạo một Wildcard certificate (thêm *. ở đầu domain)
certbot certonly --manual \
  --preferred-challenges=dns \
  --email contact@dungnv.info \
  --server https://acme-v02.api.letsencrypt.org/directory \
  --agree-tos \
  -d "*.dungnv.info"

Nếu bạn config cho Wildcard, sẽ nhận được thông báo yêu cầu tạo TXT record cho DNS trước khi tiếp tục.

Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Requesting a certificate for *.dungnv.info
Performing the following challenges:
dns-01 challenge for dungnv.info

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.dungnv.info with the following value:

Fm50ETBxgTybISnhHUsxqHHaGLiNMzxxHeFVxB1reeU

Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


# Sau khi hoàn tất, kiểm tra lại các certificate
sudo certbot certificates

Chi tiết về các command line xem tại: https://certbot.eff.org/docs/using.html

Chỉnh sửa lại các certificate của HTTPS tại /etc/httpd/conf.d/ssl.config theo đường dẫn mới.

SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key

Restart lại apache:

systemctl restart httpd

Kiểm tra xem certficate có hoạt động không?

https://www.ssllabs.com/ssltest/analyze.html?d=example.com

Để certbot tự động gia hạn ssl, chúng ta có thể sử dụng cronjob để làm việc đó tự động thay vì phải tự login gia hạn hằng tháng.

# Gỡ lệnh chỉnh sửa cronjob
sudo crontab -e

# Trigger lệnh certbot renew mỗi ngày thứ 10th của tháng vào lúc 00:00
0 0 */10 * * certbot renew >> /var/log/certbot-cron.log 2>&1 && systemctl restart httpd.service

Một vài command khác cho certbot

# Lấy danh sách các thông tin certificate đang được hoạt động
sudo certbot certificates

# Output của lệnh trên
Found the following certs:
  Certificate Name: mydomain.com-0001
    Key Type: RSA
    Domains: *.mydomain.com
    Expiry Date: YYYY-MM-DD hh:mm:ss (VALID: xx days)
    Certificate Path: /etc/letsencrypt/live/mydomain.com-0001/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/mydomain.com-0001/privkey.pem
  Certificate Name: mydomain.com
    Key Type: RSA
    Domains: mydomain.com
    Expiry Date: YYYY-MM-DD hh:mm:ss (VALID: xx days)
    Certificate Path: /etc/letsencrypt/live/mydomain.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/mydomain.com/privkey.pem


# Renew một certificate chỉ định. (Bỏ --dry-run để thực sự là renew).
sudo certbot renew --cert-name mydomain.com --dry-run
0

Triển khai dotnet Core lên CentOS

Từ khi Microsoft bắt đầu lên kế hoạch OpenSource .NET và cho phép .NET có thể chạy và triển khai được đa nền tảng (bao gồm Windows, MacOS, Linux) và các ứng dụng di động, đám mây, IOT. Mình đã rất chờ đợi để thử triển khai và so sánh performance của nó, bởi vì trước đây để triển khai .NET buộc phải sử dụng Windows Server và với chi phí tốn kém hơn, đồng thời cũng yêu cầu cấu hình cao hơn rất nhiều so với Linux. Vì vậy nay mình viết lại các step triển khai cho anh em có quan tâm có thể thử nghiệm và áp dụng.

Bước 1. Cài đặt Dotnet Core lên server của bạn.

Option 1: Sử dụng thông qua repo của Microsoft và sử dụng lệnh Yum thông thường.

# Thêm repo cho Yum
sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

# Cài đặt phiên bản .NET SDK thông qua Yum với CentOS 7.
sudo yum update -y
sudo yum install dotnet-sdk-3.1 -y 

# Cài đặt thông qua CentOS 8
sudo dnf install dotnet-sdk-3.1

Option 2: Cài đặt thông qua file download.

# Tải về file dotnet core sdk
curl -sSL -o dotnet.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/3.1.1xx/dotnet-sdk-latest-linux-x64.tar.gz


# Giải nén và tạo thư mục
mkdir -p ~/dotnet && tar zxf dotnet.tar.gz -C ~/dotnet

# Thêm dotnet vào biết môi trường.
export PATH=$PATH:$HOME/dotnet

Bước 2. Thử kiểm tra xem đã cài đặt thành công hay chưa

# Để chạy một dự án, đầu tiên bạn phải cài đặt 2 thư viện sau.
sudo yum install libunwind libicu -y

# Tạo một dự án sampleProject và chạy thử.
dotnet new console -o sampleProject
cd sampleProject
dotnet run

Đảm bảo dotnet core chạy và in ra dòng chứ “hello world”.

Bước 3. Cài đặt một web server (Apache hoặc Nginx) và cấu hình.

Option 1: Sử dụng Nginx.

# Cài đặt Nginx thông qua Yum.
sudo yum install nginx -y

# Tạo file config "your_domain" cho domain của bạn tại: /etc/nginx/sites-available/
sudo vi /etc/nginx/sites-available/your_domain
sudo ln -s /etc/nginx/sites-available/your_domain /etc/nginx/sites-enabled/

# Thêm một vài setting để điều hướng port
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
server {
    listen 80;
    listen [::]:80;
    server_name 192.x.x.x;
    location / {
        proxy_pass         http://127.0.0.1:5000;
        proxy_http_version 1.1;
        proxy_redirect          off;
        proxy_set_header   Upgrade $http_upgrade;
        #proxy_set_header   Connection keep-alive;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header   Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Proto $scheme;
        client_max_body_size    10m;
        client_body_buffer_size 128k;
        proxy_connect_timeout   90;
        proxy_send_timeout      90;
        proxy_read_timeout      90;
        proxy_buffers           32 4k;
    }
}


# Chạy service Nginx.
sudo systemctl enable nginx.service
sudo systemctl start nginx.service

# Kiểm tra config nginx trước khi restart
sudo nginx -t
sudo systemctl restart nginx

Option 2: Sử dụng Apache.

# Cài đặt httpd và mod_ssl thông qua Yum
sudo yum update -y
sudo yum -y install httpd mod_ssl mod_proxy

Tạo một file gameserver.conf config httpd cho dự án đặt tại /etc/httpd/conf.d/

<VirtualHost *:*>
    RequestHeader set "X-Forwarded-Proto" expr="%{REQUEST_SCHEME}"
</VirtualHost>

<VirtualHost *:80>
       ProxyPreserveHost On
       ProxyPass / http://localhost:5000/
       ProxyPassReverse / http://localhost:5000/
       ErrorLog /var/log/httpd/gameserver-error.log
       CustomLog /var/log/httpd/gameserver-access.log common
</VirtualHost>

Kiểm tra config của http có chính xác không

sudo service httpd configtest

Nếu kết quả hiện “Syntax [OK]” là đã đúng rồi, tiến hành bắt đầu kích hoạt service.

# Chạy service httpd
sudo systemctl enable httpd
sudo systemctl start httpd

# Một vài trường hợp cần active lại mod_proxy
 setsebool -P httpd_can_network_connect on

Bước 4. Tạo một file service để khởi chạy dự án.

Tạo file service gameserver.service đặt tại /etc/systemd/system/ với nội dung như ví dụ dưới đây:

[Unit]
    Description=Game Server .NET Web API Application running on CentOS 7
    [Service]
    WorkingDirectory=/home/dungnv/gameserver
    ExecStart=/dotnet/dotnet /home/dungnv/gameserver/GameAPI.dll
    Restart=always
    RestartSec=10
    SyslogIdentifier=dotnet-gameserver
    User=root
    Environment=ASPNETCORE_ENVIRONMENT=Production
    [Install]
    WantedBy=multi-user.target

Lưu file service lại và bắt đầu chạy các service.

# Móc nối service và kích hoạt service khi khởi động lại máy.
systemctl enable gameserver.service

# Bắt đầu khởi chạy service gameserver
systemctl start gameserver.service

# Xem thông tin tình trạng khởi chạy service.
systemctl status gameserver.service

# Để xem logs của service.
sudo journalctl -fu gameserver.service
sudo journalctl -fu gameserver.service --since "2016-10-18" --until "2016-10-18 04:00"
sudo journalctl -fu gameserver.service -n 1000

Bước 5: Cấu hình firewall và mở port.

# Cài đặt firewall
sudo yum install firewalld -y

# Kích hoạt firewall.
sudo systemctl enable firewalld.service
sudo systemctl start firewalld.service

# Mở port và kiểm tra lại.
sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --add-port=443/tcp --permanent
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

Đã hoàn tất. Giờ bạn có thể truy cập vào public url của domain để kiểm tra thử xem API hoạt động chính xác chưa?.

Cấu hình và sử dụng giao thức HTTPS cho Apache

Ngoài ra nếu bạn sử dụng rewriting URL hoặc cho phép HTTPS thì cần cấu hình thêm một vài mod của httpd.

Để sử dụng SSL tại giao thức kết nối an toàn, thì cần kích hoạt mod_ssl cho Apache, nếu chưa thì cài đặt vào nạp cùng Apache.

# Cài đặt module mod_ssl cho HTTPS
sudo yum install mod_ssl

# Cài đặt module rewrite url
sudo yum install mod_rewrite

Khi có mod_ssl, có thể tạo vhost lắng nghe ở công 443, bạn cũng nền cài đặt mod_rewrite để tự động chuyển truy cập http thường thành https.

Cấu hình SSL thì cần có cặp public/private key chứng thực bởi một bên thứ 3 (như Let’s Encrypt “Free”), tuy nhiên để kiểm tra tự phát sinh cặp key này, ta cần tự xác thực.

Thực hiện các lệnh

mkdir /certdungnv
cd /certdungnv/
openssl genrsa -out ca.key 2048
openssl req -new -key ca.key -out ca.csr
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

Hoàn thành các lệnh trên sẽ thu được tại public key tại /certdungnv/ca.crt và private key tại /certdungnv/ca.key

Chỉnh sửa gameserver.conf để cho phép URL rewriting và cho phép giao tiếp với port 443.

<VirtualHost *:*>
    RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME}
</VirtualHost>

<VirtualHost *:80>
    ServerName dungnv.info
    ServerAlias *.dungnv.info

    # Chuyển hướng HTTP thành HTTPS
    RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

<VirtualHost *:443>
    ProxyPreserveHost On
    ProxyPass / http://127.0.0.1:5000/
    ProxyPassReverse / http://127.0.0.1:5000/
    ErrorLog ${APACHE_LOG_DIR}gameserver-error.log
    CustomLog ${APACHE_LOG_DIR}gameserver-access.log common
    
    # Cấu hình HTTPS
    SSLEngine on
    SSLCertificateFile /certdungnv/ca.crt
    SSLCertificateKeyFile /certdungnv/ca.key
</VirtualHost>

# Hoặc cấu hình HTTPS như config mặc định.
<VirtualHost *:443>
    SSLEngine on
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:!RC4+RSA:+HIGH:+MEDIUM:!LOW:!RC4
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
</VirtualHost>

Cấu hình HTTPS với Subdomain

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName api.dungnv.info
    SSLProxyEngine on
    SSLProxyVerify none 
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off
    SSLEngine on
    ProxyPass / https://127.0.0.1:5001/
    ProxyPassReverse / https://127.0.0.1:5001/
    SSLProtocol all -SSLv2
    SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:!RC4+RSA:+HIGH:+MEDIUM:!LOW:!RC4
    Include /etc/letsencrypt/options-ssl-apache.conf
    SSLCertificateFile /etc/letsencrypt/live/dungnv.info-0001/cert.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/dungnv.info-0001/privkey.pem
    SSLCertificateChainFile /etc/letsencrypt/live/dungnv.info-0001/chain.pem
</VirtualHost>
</IfModule>

Khởi chạy lại service.

# Kiểm tra lại setting đúng hay không trước khi khởi động lại.
sudo service httpd configtest

# Khởi động lại Apache sau khi chỉnh sửa.
sudo systemctl restart httpd

0

Hướng dẫn tạo Subdomain trên Apache

Bài viết này mình sẽ hướng dẫn mọi người tạo một subdomain cho website sử dụng qua apache.

Ví dụ: http://file.dungnv.infohttp://upm.dungnv.info cho website http://dungnv.info

Cấu trúc thư mục /var/www/html chứa các website mình đã config như sau với các thư mục con

├── html
│   ├── blogs          -> Code trang chủ dungnv.info
│   ├── file.dungnv.info -> Code trang upload files
│   ├── unityregistry      -> Code trang Verdaccio quản lý version

  • Chỉnh sửa file config tại /etc/httpd/conf/httpd.conf
vi /etc/httpd/conf/httpd.conf
  • Comment lại dòng DocumentRoot 
#DocumentRoot "/var/www/html"
  • Bỏ comment dòng NameVirtualHost 
NameVirtualHost *:80
  • Cuối cùng, thêm đoạn cấu hình sau vào dưới cùng file httpd.conf 
<VirtualHost *:80>
  DocumentRoot /var/www/html/blogs
  ServerName dungnv.info
</VirtualHost>

<VirtualHost *:80>
  DocumentRoot /var/www/html/file.dungnv.info
  ServerName file.dungnv.info
  <Directory "/var/www/html/file.dungnv.info">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order deny,allow
    Allow from all
    Require all granted
  </Directory>
</VirtualHost>

<VirtualHost *:80>
  ServerName upm.dungnv.info
  ProxyPreserveHost On
  ProxyPass / http://localhost:4873/
  ProxyPassReverse / http://localhost:4873/
</VirtualHost>
  • Kiểm tra và restart lại apache
sudo service httpd configtest
sudo service httpd restart
0

Tổng hợp các command của CentOS 7 cho người mới sử dụng Linux

Đôi khi mình sử dụng CentOS nhưng vẫn phải đi search lại các command, nên muốn làm một bài viết để tổng hợp lại các lệnh đã sử dụng, mình nghĩ có thể hữu ích cho mọi người.

Mình sẽ cố phân loại các lệnh để anh em dễ dàng tìm nhất.

# Kết nối đến server với username và port 2204
ssh root@dungnv.info -p2204

# Liệt kê các file, thư mục hiện tại
ls
ll /var/log/

Các lệnh kiểm tra thông tin VPS

# Kiểm tra phiên bản hệ điều hành Linux đang chạy
cat  /etc/centos-release

# Kiểm tra ổ cứng hiện tại trên ổ cứng.
fdisk -l

# Kiểm tra kích thước ổ cứng và từng phân vùng.
df -h

# Kiểm tra số tượng CPU
nproc

# Kiểm tra dung lượng RAM
free -m

# Kiểm tra các tiến trình đang chạy ~(Task Manager)
top -c

# Ép dừng một tiến trình đang chạy (pid: process id)
kill {pid} 

# Kiểm tra một tiến trình mong muốn đang hoạt động
ps -ef | grep {apache}

Các lệnh xử lý file và thư mục

# Di chuyển đến một thư mục temp
cd /temp

# Hiện thị đường dẫn thư mục hiện hành
pwd

# Tạo một thư mục có tên là temp
mkdir {temp}

# Xóa một file test.txt
rm test.txt

# Xóa toàn bộ thư mục và các file bên trong thư mục temp
rm -rf temp/

# Di chuyển hoặc đổi tên thư mục
mv {temp1} {temp2}

# Copy file test.txt sang test2.txt
cp {test.txt} {test2.txt}

# Xem nội dung của file test.txt
vi test.txt
vim test.txt

# Xem nội dung hiện trong file và cập nhật liên tục, khởi đầu với 10 dòng cuối
tail -f /var/log/message

# Phân quyền một tệp tin hoặc thư mục
chmod 755 test.txt
chmod -R 755 temp/*

# Phân quyền sở hữu tệp tin test.txt hoặc toàn bộ thư mục temp
chown dungnv:root test.txt
chown -R dungnv:root temp/

# Nén và giải nén thư mục
zip -r folder.zip temp
unzip file.zip -c ~/temp

tar -zcf folder.tar.gz temp
tar -zxvf file.tar.gz -c ~/temp

# Tạo một symbolic links và xóa link.
ln -s /var/www/html ~/web
unlink ~/web
rm -d ~/web

Các lệnh cài đặt và download

# Download file tại URL lưu thành file dotnet.tar.gz
curl -sSL -o dotnet.tar.gz https://aka.ms/dotnet-sdk-2.0.0-linux-x64 

# Download file với URL
wget {url}

# Cài đặt một phần mềm với Yum
yum install {httpd}
yum install {httpd} -y (-y nghĩa là đồng ý không cần hỏi)

# Update một gói phần mềm với Yum
yum update {httpd}

# Gỡ bỏ một phần mềm
yum remove {httpd}

Các lệnh thông dụng.

# Mở port firewall (Yêu cầu cài firewall)
sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --remove-port=80/tcp --permanent
sudo firewall-cmd --reload

# Remove port khỏi firewall.
firewall-cmd --zone=public --remove-port=80/tcp
firewall-cmd --runtime-to-permanent
sudo firewall-cmd --reload

# Xem danh sách port của firewall
sudo firewall-cmd --list-all

# Kích hoạt service
sudo systemctl enable firewalld.service

# Tương tác với service
sudo systemctl start httpd.service
sudo systemctl stop httpd.service
sudo systemctl restart httpd.service
sudo systemctl status httpd.service

# Đọc thông tin log của service 
sudo journalctl -fu httpd.service

# Kiểm tra config của httpd có chính xác không?
sudo service httpd configtest

Các thao tác cơ bản khi sử dụng lệnh vi.

Khi bắt đầu sử dụng lệnh vivi mặc định ở command mode. Ấn phím lệnh iao hoặc Inserrt  từ chế độ command mode để chuyển sang insert mode.

  • để thêm ký tự trước con trỏ,
  • a để thêm ký tự sau con trỏ,
  • o để chèn thêm dòng mới sau con trỏ.
  • Ấn Esc để chuyển đổi qua lại từ command mode với insert mode.

Một số lệnh với vi:

  • :set nu hiện thị số dòng
  • :set nonu bỏ hiện thị số dòng
  • Sử dụng phím mũi tên hoặc các phím h,l,j,k để dịch trái, phải. lên, xuống
  • :1 để nhảy đến dòng đầu tiên của file
  • :n nhảy đến dòng n
  • nhảy xuống cuối dòng
  • :$ nhảy đến dòng cuối của file.
  • 0 nhảy về đầu dòng
  • :0 nhảy về dòng đầu tiên của file.
  • dd xóa một dòng hiện tại
  • ndd xóa n dòng
  • / hay ? để tìm kiếm
  • :w! lưu tập tin
  • :x! lưu tập tin và thoát
  • :wq ZZ lưu tập tin và thoát
  • :q! không lưu và thoát
0